Posts Tagged ‘Universe’

Handle semi aggregate measures in universes

Published by Ron Keler in Universe Design on January 25th, 2011 | No Comments »

While relatively simple data marts can be designed as true simple stars, more often than we like, our reporting data models contains snowflakes. Whatever you want to call these entities, they represent one basic problem for your reporting tools: Cartesian products. Let’s see why. In a simple snow flake model, your fact and dimension tables are joined in a “one way” relationship: one dimensional attributes can have zero or many facts. That’s it. This is a nice and clean design, and it makes aggregation of measures across facts a walk in the park. You never have to worry about cartesian products when you join facts and dimensional attributes, since your facts cannot be double counted by joining them to the dimension. Structurally, the joins look like this:

And they will yield data like this:

John Doe had two transactions, totaling $50 and in total the 4 transactions sum up nicely and with no issues to $85.

When you snow flake, you have to account for the possibility of creating a Cartesian product. Now, each dimensional row has a one-to-many relationship with an additional table, in effect creating a many-to-many relationship in your model. Now, your model looks like this:

And when you join addresses in with sales and clients, you get wrong numbers as you sum things up:

Since Mr. and Mrs. Doe moved from CA to NY, when we join in this information, our relational DB will make it look as if their 3 transactions are 6 and the $85 we earned is $145, because it’s double counting transactions. This may be good news for the sales team, but the auditors will give you a bit of a hard time.

As much as you will try to avoid this problem, complex models often require this kind of snow flaking for all sorts of good reasons. In this example, imagine if you are dealing with many millions of customers, with addresses as multipliers for each customer, I doubt you will be looking to add an “address” dimension in your sales fact. Slightly normalizing your model and adding the kind of relationship illustrated in the second model is perfectly reasonable.

Different tools have different solutions to this problem; BusinessObjects Universe meta-data layer provides you with the tools to address this problem in the form of aliases and contexts.

First, create your universe and setup your joins. You can try running the universe Check Integrity tool, but it will not detect any problem. The structure looks correct from a simplistic perspective, and as long as you are not trying to aggregate, you will not see problems.  But we know better…

To solve the problem, we can force business objects to issue two separate queries when users request to get data from all three tables, and maintain the correct aggregation level for the sale measures. Here’s how:

First, we create an alias table to the sales table. We will point the sales object to the alias and leave the rest of the table attributes as mapped to the base representation of it.

Next, create a join from the client table to the sales alias. Finally, create two contexts, one for the join path that includes the address table and the sales table, and the other for the client and sales alias only.

That’s it! You are now ready to handle a variety of query scenarios without needing to worry about your universe users accusing you of “cooking the books”… Here’s what will happen:

When your users select the client name and address objects, webi will issue a single query based on the join path/context specified as CLIENT_SALES. When they add the address zip code, webi will issue a SECOND SEPARATE QUERY to get that data and will stitch the result sets together in its micro-cube.

Localize your global Xcelsius dashboard

Published by Ron Keler in Xcelsius on January 23rd, 2011 | No Comments »

If your dashboard is intended for a global audience, you may need to be able to localize it. By localization, most people refer to the ability to translate at minimum the labels and headers of the dashboard, based on the user locale, language. BusinessObjects provides localization solutions for its reporting platform, most notably in the form of the Translation Manager tool which allows you to provide various translations for your universe objects that are automatically displayed based on the user locale in InfoView. Unfortunately, the translation manager does not apply to Xcelsius dashboards. To work around that, you can implement a simple data driven approach that combined the power of webi with a simple translation table for your dashboard meta data to deliver a localized global dashboard.

First, you will need to create a translations table that will contain your dashboard meta-date, the labels and headers you use. You will need at least three columns in the table, the label value, the locale you enter it in, and some value to identify the label in the dashboard (in this example, I used sort order)

 

Add this table to your universe. Now, create a webi report that includes the value column. To make sure the labels displayed are at the appropriate language, add a filter to your block to filter the rows where the locale is the same as the user preferred viewing locale. You can do that by creating a variable that checks for this condition, and then apply a block filter based on this variable.

Now, use LiveOffice to embed the report data in your dashboard and use the labels column for your dashboard labels. They will automatically filtered based on your user selected locale in InfoView and presented in the appropriate language.

QaaWS vs LiveOffice

Published by Ron Keler in Xcelsius on January 21st, 2011 | No Comments »

One of the first major decisions you will face when starting to design your SAP BusinessObjects Xcelsius dashboard is which connectivity option to choose. Xcelsius supports a myriad of connectivity options, and two of the most popular connections for BusinessObjects are Query as a web service (known for short as QaaWS) and Live Office (LO for short). Both of those relay on your centralized BusinessObjects semantic layer, the universe, and from that perspective, they are equally good. They differ greatly though in how they connect to Xcelsius, and can serve different purposes.

QaaWS provides you with essentially the Webi query panel interface and is able to convert queries against the universe into web services. These web services can be consumed by any application that can communicate with these web services, Xcelsius included.

QaaWS connections are reliable and have been around for a few years, since their inception as a BusinessObjects labs offering through their full integration into the main stream product. They are fast, leverage the power of the universe and are an excellent choice for connecting Xcelsius dashboard to your live data.

QaaWS falls short however in its ability to handle more complex data structures, or its ability to provide a “staging” platform for Xcelsius. It will return, in essence, a two dimensional record set, a simple table.

Live Office has also been around the block for several years and has stabilized to become a good choice as well. It provides connectivity to a web intelligence report block, rather than to a universe query. As such, it allows you to stage data in various ways (cross tabs, complex multi row/column tables with various levels of aggregation, highly formatted data, using variables, calculations, etc). All this power though comes at a price. The integration of LO into Xcelsius is much more cumbersome and its performance is slightly inferior to QaaWS because it has additional overhead.

In general, you won’t really go wrong if you choose either one. What you should consider as you make your selection are:

QaaWS will most likely put your development effort for the dashboard data entirely in the hands of your database developers and somewhat in the universe developers. Any calculations, data combinations and complexity in staging data for your dashboard will need to be handled in the database layer, since you will not have a platform to do these, unless you want to use Xcelsius itself, which may provide impossible or drag down your performance to an unacceptable level.

LO will provide your dashboard developers with more flexibility by allowing them to stage data in powerful ways for Xcelsius consumption, but because of the complexity of integrating these connections into Xcelsius you will pay the price in maintenance, and flexibility in making changes to your underlying data model that require changes in your report blocks.

The future looks a lot more promising though. BI Services are now available to publish webi blocks as web services. This approach is rather new and is still maturing, but the direction of combining the benefits of both QaaWS and LO seems like a winning proposition.

Furthermore, the next major release of Xcelsius will contain a native query panel, right inside Xcelsius, which promises to deliver additional benefits and capabilities in terms of data integration. So, lots of exciting developments and opportunities to improve Xcelsius data connectivity are in the pipeline. Stay tuned…

Google style search on your Xcelsius dashboard

Published by Ron Keler in Xcelsius on January 20th, 2011 | No Comments »

Dashboard designers have long been concerned with design and usability, concepts typically foreign to IT development. Leveraging all types of selectors in the forms of combo boxes, list selectors, radio buttons and check boxes, they try to make information finding easier and simpler. Well, if you are looking for a way to let your dashboard users find something, why not let them simply search for it… Following these simple few steps, you can easily add “google style search” functionality on your SAP BusinessObjects Xcelsius dashboard to allow users to quickly find what they are looking for in your structured data. This example, uses the eFashion sample database and universe that ships with BusinessObjects. 

First, create a webi report that you will later connect your Xcelsius dashboard to using LiveOffice connection. The webi report should contain the data needed for your dashboard. The report query, should have an optional prompt filter for each column you would like to be able to search for. All the optional prompts must have the SAME NAME. Web Intelligence will consolidate all prompts with the same name and apply the same value entered on them to each of the criteria filters. So, the where clause generated will look something like: where search_column_1 like @Search_Prompt or search_column_2 like @Search_Prompt or search_column_3 like @Search_Prompt etc… 

  

  

Note, for this example, the Zip Code universe object was converted to a String type using Cstr(Outlet_Lookup.Zip_code) 

 

 

After creating your webi report block, insert it into excel using Live Office. Refresh the report block in LO and bound the report prompt to a cell in your excel sheet. Replace the prompt value in the bound cell with a formula that will enclose your user input in Xcelsius within two wilchar characters (%value%). Note, you can also upper case your search results this way to eliminate case issues in your case sensitive database. 

 

 

Finally, import the excel spreadsheet into Xcelsius. Complete the setup by setting up the live office connection and refresh options, layout your components, and there you go. Google style search functionality in your dashboard. You can download an example xlf HERE 

Search for store manager Steve

 

Search for zip codes that contain 96

Handling the ALL level in Xcelsius selectors

Published by Ron Keler in Xcelsius on January 13th, 2011 | No Comments »
Handling the ALL level in Xcelsius selectors is always a problematic proposition. If you tried using a selector to pass a value to your BusinessInteligence prompt, in order to retrieve filtered data from the database, you must have run into this issue. While selector components are generally highly configurable and provide loads of useful functionality, they lack the inherent capabilities to handle an “all” selection, which would apply everything is selected. When using BusinessObjects as a data source for an Xcelsius dashboard, you can use one of the following simple techniques to address this problem, and resolve it with relative ease.

First approach: leverage webi optional prompt option for a single list of values

Since the release of XI 3.0 webi was enhanced with the capability to create optional prompts. If you only need to handle a single list of values in a single selector, and you are looking to retrieve new database values each time the selection changes, you can create an optional prompt in your query, and then bind the prompt value to a cell in your excel model. The value that the webi  web service (LO/QaaWS/BI Service) will be looking for to ignore the selected prompt would be <Not Specified> (including the greater then less then brackets). You can use a formula in your model to convert this value for presentation purposes, and display ALL or anything else for that matter.

Second approach: when dealing with multiple lists of values

The second use case addresses a situation in which multiple selectors are needed and you do not plan to retrieve data from the database every time a selection is made. In this scenario, you will need not just one ALL row, but multiple ALL rows, one for each dimensional value in your multi-selectors. In this example, you need to produce data for states and product lines (from eFashion) with revenues, and allow users to filter the data for any combination of states and lines.

 

In this case, you can create an ALL object in your universe (for two dimensions, you will need two) and then use union queries in your webi report to artificially manufacture an ALL summary row for each level in your data. Once you have your data setup this way, you will be able to easily filter it based on the user selection in the selectors. 

The second use case addresses a situation in which multiple selectors are needed and you do not plan to retrieve data from the database every time a selection is made. In this scenario, you will need not just one ALL row, but multiple ALL rows, one for each dimensional value in your multi-selectors. In this example, you need to produce data for states and product lines (from eFashion) with revenues, and allow users to filter the data for any combination of states and lines.

In this case, you can create an ALL object in your universe (for two dimensions, you will need two) and then use union queries in your webi report to artificially manufacture an ALL summary row for each level in your data. Once you have your data setup this way, you will be able to easily filter it based on the user selection in the selectors.

© BI HAPPY
CyberChimps