Wednesday, April 9, 2014

Business Objects: Drill on a union demistified


We can have a single data provider (DP) incorporating a number of queries with union(s), but we already know that.

We also know that we can enable drill on such a report. There's just one caveat, the mechanics of drill on a DP that utilizes unions can be a little confusing. The confusion emerges from the fact that business objects take a different course of action during drill on a union enabled DP.  Let’s examine this peculiarity.

Assume that we have a data provider combining two different data sets (queries) from a single universe with a union. The first one gets sales on a regional structure for Europe while the second accumulates results regarding the USA area. Thus we have two different queries with two discrete hierarchies.



The schema on our universe for the aforementioned scenario is depicted in the following figure. It’s a single fact table with two distinct dimension tables, another variance of the same situation can occur when we have two separate star schemas. 




We create the data provider and combine the two data sets in Webi.

First the EU part:





Then the corresponding  USA query:



If we opt to leave the extra information (e.g city) out of the basic query and allow the report consumers to fetch detailed information as they see fit then we are in for a surprise. While Business Objects "knows" that each query has a different hierarchy (you can check this by changing the scope level) it performs drill down by selecting the next dimension of the hierarchy only for the first query and tries to apply that Dimension to the following queries as well.





In this way when we try to drill down at city level for USA (on the fly) we are going to get unexpected results!




Actually BusinessObjects are traversing the hierarchy for the first query and appling the resulted dimension  (in our case the EU City) to the rest of the queries participating the data provider as well. We can rectify this issue by going back to the data provider and explicitly set the scope of analysis for each query:







Needless to say, that this forced option outwit any decisions taken to make the report more responsive (e.g. late loading of details).

The above scenario holds true for Business Objects XI R3 SP5.