# When analysis is better using Web Intelligence than Excel

This article compares data analysis using Web Intelligence to the same workflow using Microsoft Excel and for the given scenario demonstrates why using Web Intelligence is quicker, easier and less error prone. The objective here is not to show that in all cases Web Intelligence is better than Excel rather to highlight that there are some situations where it is preferable to use Web Intelligence. Equally there are some situations where Excel is better than Web Intelligence, for example, calculating the geometric mean is easier in Excel as we can use a built in formula whereas in Web Intelligence we have to calculate the geometric mean manually.

First let us consider he following typical business scenarios,    The head of account management is looking at reassigning clients to account managers in her team. To do so she first wants to get a list of accounts that Bob has dealt with that Sarah has also dealt with. A marketing analyst would like to get a list of products that are no longer in the top 100 this month that were top 100 last month. Also from marketing analysis we want to review customer segmentation. We want to know how many of our customers are in the age group 20 to 25 and how many live in a large city and how many own a car. We also want to know how many fall into each of these three segments.

Each of these scenarios are simple enough to understand but doing the performing the analysis can get quite complex as in each case we are having to perform set analysis. Set analysis is all about identifying one group of customers, products, clients etc and then seeing how this set compares to another set. In the first scenario above the two sets are Sarah’s clients and Bob’s clients and we want to see what clients in one set belong to another. In the second scenario one set is the top one hundred products this month and the second set is the top one hundred products last

Set operations are often represented as Venn diagrams where the two circles represent each set and the different areas represent the different relationships. And in the last scenario we have three sets: customers aged 20 to 25. Venn diagram of scenario three display relation between three sets Almost all leading databases support set operations and we can use Web Intelligence to make use of these to perform our set analysis. Let us look at how Web Intelligence compares to Excel for this type of analysis. Microsoft Excel however is not particularly good at set operation. Set Analysis using Excel Let us look at how we might perform the first scenario in a spreadsheet.month. customers who live in a large city and customers who own a car. Figure 1. Venn diagram displaying the relation between Sarah's and Bob's clients and the third scenario above is represented by this Venn diagram. although it can be done with a bit of hacking around. Figure 2. The first scenario is displayed as a Venn diagram in figure 1 below. . Consider a spreadsheet where we have two columns: a list of Sarah’s Clients and a list of Bob’s Clients and we want to produce a list of clients that belong to both Bob and Sarah.

1. For longer lists we can make use of the vlookup function.Figure 3. =VLOOKUP(C3. Set Analysis in Excel using the vlookup function Beside the two columns of data we add a third column and enter the formula. We could then just write down the clients common to both.FALSE) and copy this down over all rows. This is fine for a small list such as above but not so practical if the lists contains hundreds or thousands of entries.B\$3:B\$21. Bob's clients and clients of both Bob and Sarah We can of course just visually inspect the two lists and can spot which clients are common to both for example “Initech” and “Roboto Industries” are in both lists. Screenshot of Excel spreadsheet display three lists of Sarah's clients. This will give a result similar to the screenshot below .

To remove these we can use the filter function to hid the blank rows. As we can see it is not impossible to identify which clients are common to both Bob and Sarah using Excel but it isn’t particularly straightforward. So we have now identified a list of clients common to both lists however all these “#N/A” statements are a bit ugly but we can hide these by updating our formula to.Figure 4. .B\$3:B\$21.FALSE))).1."") We now have a list of clients common to both Bob and Sarah but we still have blank rows for when there is a client in common. =IF(NOT(ISERROR(VLOOKUP(C3. Let us now look how we can perform the same analysis using Web Intelligence Set Analysis using Web Intelligence We have a universe that we can use to get a list of clients that an account manager has had contact with so first we’ll create a query that lists Sarah’s clients. Excel spreadsheet using vlookup function to identify entries common to both lists This is effectively taking a value from Bob’s list (range C3 to C21) and then looking up this value in Sarah’s list (range B3 to B21). Furthermore if we have large data sets or we are trying to analyse three or more sets of data then this method becomes quite time consuming and is prone to copy/paste mistakes and other user errors. When it finds a match it returns the value otherwise it returns an “#N/A” error. However this also affects the original lists so not ideal but we can copy values of the final list to another spreadsheet.C3.

We also change the set operator from “union” to “intersection” and run the quer y.Figure 5. Figure 6. We now edit the query and click the set analysis icon to create a second query. Figure 7. Web Intelligence query using set analysis feature to perform an intersection of two queries This then produces a list of clients that both Sarah and Bob have had contact with. . here we update the query filter to now list Bob’s clients. Web Intelligence query that will return a list of clients for Sarah And this produces a simple table listing Sarah’s clients. Web Intelligence report displaying result of intersection query As can been seen this is much quicker and easier than hacking the data in Excel. In addition we can easily change the set operator to the minus set operator to determine which clients Sarah has had contact with that Bob has not. For more information on this feature see “Using combined queries” in the Web Intelligence user guide “Building Reports with the SAP BusinessObjects Web Intelligence Java Report Panel”.

Report side set analysis Here we create two separate queries and then integrate the result in the report. the other option is to bring both sets of data into the report and then analyse the data there however Web Intelligence doesn’t provide any set analysis features or formula so it is a little tricky but it is still possible. When we run this report Web Intelligence will by default enable the merge dimension feature to integrate the results of the two queries and the screenshot below shows the result. Result of using two queries and using the merge dimension feature to integrate the result in the report The report displayed above in figure 8 is the result from this query and here we are displaying three columns. a list of Bob’s clients and a list of clients common to both. We create a report that contains two queries. This could be useful if we want to display a list of Sarah’s clients. Figure 8. The first displays the result set of the query returning Sarah’s .Is this the only way of doing set analysis in Web Intelligence? Well it is certainly the easiest. For more information on merged dimensions see the chapter “Merging di mensions from multiple data providers” in the Web Intelligence user guide. Each query is the same as shown in figure 5 above where in the Result Objects we have client name and in the Query Filters we have “Employee Name equals Sarah” in one and “Employee Name equals Bob” in the other query. Let us look at how we might do this.

Report updated with a formula to determine which clients are common to both sets Finally we create a new variable of this formula which we can then use to filter the table to only display the clients common to both Sarah and Bob. the other Bob’s clients and in the middle we have the result of the merged dimension. We then update this to. When merging these two queries Web Intelligence is performing a union of data from both queries (in SQL language a full outer join).[Client Name]. We add a new column to the middle table and enter the following formula. =Count([SarahsClients]. Unfortunately there isn’t any feature where we can control how Web Intelligence merge s the result sets.Clients. . What we want however is an intersection of these two data sets (or normal join in SQL). =Count([SarahsClients].[Client Name]. However there is a workaround. All) + Count([BobsClients]. All) And this returns a 2 when the client exists in both Sarah’s and Bob’s client list. Figure 9.[Client Name]. All) This returns 1 when the client belongs to the set of Sarah’s clients otherwise it returns zero. for example instructing Web Intelligence to use an intersection or indeed a minus set operation rather than a union.

In Web Intelligence the easiest method is to use the set analysis feature of the query to return our desired set. Tuesday. Final report with middle table filtered to display clients in common to both sets Conclusion Above has shown that both Excel and Web Intelligence can perform Set Analysis. 2010 by Al Gulland . In Excel it requires a reasonable amount of manual intervention and the use of the vlookup function to establish a list of members common to both sets. So it is reasonable to conclude that set analysis is best performed using Web Intelligence. This manual effort is time consuming and is prone to user errors. This article isn’t trying to show that in all cases you must use Web Intelligence ins tead of Excel but is aiming to highlight that as an analyst you should know both products and be able to decide which tool is best for a given scenario.Figure 10. We also saw that it is possible to perform the same analysis in the report through use of a relatively simple formula although it would be better if we could specify that the merge dimension feature should use an intersection or minus when merging two data providers. June 1.