Quantcast
Channel: SCN : Unanswered Discussions - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 4343

How to create a multiple fact reporting

$
0
0

Hi

 

I have tried several ways to achieve a commonly needed functionality in HANA, but I just can't get it to work.

 

Consider this: Two different tables with different granularity due to different dimension associations.

 

Table_1 - The sales could look like this:

 

LocationProductQuantity
ParisA10
ParisB20
ParisC50
ParisD30
LondonB25
LondonC15
LondonD35
MadridA20
MadridB15
MadridD5
MadridE60
BerlinB15
BerlinC30

 

Table_2 - The employee data could be like this:

LocationEmployeeHrs
ParisE160
ParisE235
LondonE325
LondonE460
MadridE540
MadridE630
MadridE720
BerlinE890

 

Now we want to analyse the sales data like:

 

  • Hrs per Location
  • Quantity per Location

 

This is handled nicely if we just union the two fact tables and add dimensions as needed.

 

Then comes the desire to know:

  • Hrs used selling product A + B (Hours, Quantity and Hours pr Qty )

 

So the user filters the data on product A and B. And here comes the tricky part, as the hours are used to sell both products in combination. This means that you can not join the tables by the Location column as this will multiply the Hours, and if you do not join by Location the Hours will have no Product information and will get filtered if you use a union to combine the data.

The killer is when you need the last measure that combines the to other measures.

 

I need this as an multidimensional model, so the use of prompts is not acceptable.

 

In Cognos cubes and Microsoft cubes this is easily achieved by using multiple data sources and just defining that some dimensions  does not filter on all fact tables - simple as that. But achieving this on Hana is just something I haven't found out how to do.

 

A similar problem arises when you have budget numbers that is not allocated to all dimensions, and you need to se the total budgeted figure even when you filter the dimensions only applicable to actuals.

 

Any bright solutions to this?


Viewing all articles
Browse latest Browse all 4343

Trending Articles