Hi All,
I'm trying to create a simple report in Analysis for Office (or any other MDX tool) based on an HANA View which counts distinct MANDT of MARA's MATNR.
Table example (MARA):
MANDT | MATNR |
---|---|
100 | xxx |
200 | yyy |
100 | yyy |
In order to do that, i created 2 test cases:
- Analytic view (from bottom node to semantics): Data Foundation Node with only MARA, Output columns: "MANDT" and "MATNR". In Logical Join Node I defined a built-in "Distinct counter" on MANDT called "TEST_COUNTER".
- Calculation View (from bottom node to semantics): Projection Node with MARA, Output Columns: "MANDT" and "MATNR", propagated to semantics. Aggregation Node, I defined a built in "Distinct counter" on MANDT Called "TEST_COUNTER".
I successfully activated both views and ran an Analysis Report on each one them, if I do not do anything, everything works fine: TEST_COUNTER equals 2.
Test Counter |
---|
2 |
My problem is that dragging "MATNR" in row area of analysis view in the "Total" row of both reports, I will find "3" as TEST_COUNTER, instead of "2" wich would have been the correct Total.
MATNR | Test Counter |
---|---|
xxx | 1 |
yyy | 2 |
Total | 3 |
please notice that this is a simplified scenario - i.e. my real table has more than 20 fields....
Any suggestion on how to achieve the distinct count?