on 04-07-2024 12:54 PM
Good day!
I am struggling to understand how count Aggregation works in Data Preview.
Context:
1) I am repeating the BW logic of Asset Accounting 0FIA_DS13 (transformations + routines) in Calculation views. In the end I want to compare result in InfoCube and in my CV. If I developed CV correctly, then data must be the same. I created a small CV which gathers data from both BW infocube table and my CV. I added a calculated column "Source" so I distinguish from what source each row came.
2) I make a Data Preview for node Aggregation_1 and put Source and 0FISCPER into Label axis area:
16 rows for BW and 12 rows for CV. That is correct.
3) Now I move 0FISCPER into Values Axis. I expect something like this:
BW - 16
CV - 12
And get this
4) I tried to use Keep Flag on 0FISCPER. It worked. Got the correct result. But then I move to the next field and I get incorrect result.
With Keep_Flag on 0FISCPER
0FISCYEAR in my case exist only 1 - 2013. The result is incorrect
If select Keep Flag "true" on 0FISCYEAR aswell the result will be the same - 16 and 12 instead of 1 and 1.
The Keep Flag option works correctly only in case when I manually, every time, switch it on for 1 field and switch it on off for all others.
My required result is (an example in excel with pivot table):
Or a least I want to see Source and 1 field, but recalculating correctly every time I change that field.
Thank for help.
Regards,
Rezm
HANA is simplifying/optimizing the SQL-statement at every node, to the requested fields only.
Try to add more keep-flags to the other key-fields of your source
and try to set the keep-flag on others levels in your calculation view,
so that more details must be read.
Check your aggregated fields in your aggregation nodes and/or switch from aggregation to projection.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can write a SQL to this CV and get the result I need:
SELECT "SOURCE", count (distinct "0FISCPER"), count(distinct "0FISCYEAR")
FROM "_SYS_BIC"."***/BW_HANA_DIFF"
GROUP BY "SOURCE"
This can work for me as a workaround, but I would like to know if I can repeat it in Node's Data Preview.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.