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:
Location | Product | Quantity |
---|---|---|
Paris | A | 10 |
Paris | B | 20 |
Paris | C | 50 |
Paris | D | 30 |
London | B | 25 |
London | C | 15 |
London | D | 35 |
Madrid | A | 20 |
Madrid | B | 15 |
Madrid | D | 5 |
Madrid | E | 60 |
Berlin | B | 15 |
Berlin | C | 30 |
Table_2 - The employee data could be like this:
Location | Employee | Hrs |
---|---|---|
Paris | E1 | 60 |
Paris | E2 | 35 |
London | E3 | 25 |
London | E4 | 60 |
Madrid | E5 | 40 |
Madrid | E6 | 30 |
Madrid | E7 | 20 |
Berlin | E8 | 90 |
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?