on 02-25-2016 10:37 AM
Hi Experts,
I am using HANA Studio 2.011 and trying to get exception aggregation for one of the attributes. I have activated Keep Flag as 'True' in aggregation node of my calculation view but still I do not see any difference and values are getting calculated after aggregation. Not sure what might be issue with Keep Flag and what work around I can do in such cases.
Regards
Jitendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jitendra,
I am using Studio 2.1.14
My Input Data is
TOTAL_SALES = AMOUNT * QUANTITY
If I select SUM(TOTAL_SALES) from Calculation View:
Calculate After Aggregation (CAA) will return --> 96,725 (Wrong Value)
Calculate Before Aggregation (CBA) will return --> 3550 (Correct Value)
I got CBA Value from Calculation View using Studio 2.1.14
I created Calc View (Data Category should be as Highlighted in the below picture)
CV Editor will be opened and Default node will be Projection.
Add Aggregation Node, There Include your Table / Analytic View.
In Aggregation Node Set "Keep Flag" Property as True for Attributes - Store ID and Project ID.
And Select Quantity and Amount Column as Aggregated Column.
Then, In Projection Mode Create Calculated Column Total_Sales using the Formula (Quantity * Amount)
In Semantics Node,
After Activating the CV, I checked the results.
I am getting correct results only (Calculate Before Aggregation)
Please follow the steps for your scenario using studio using Studio 2.*
You will get the correct output .
Let me know the results
Best Regards,
Muthu
Thanks for such nice explanation Muthu.
What you have said is valid but in my case I am using a counter which can be created only on a aggregation node and I can't use a projection. Now the only option to achieve calculation before aggregation I see is by using 'Keep Flag' (for a particular attribute), which unfortunately is not working.
However if I create a calculation view with keep flag active in its aggregation node and in turn call this calculation view in another calculation view as a projection, keep flag works (but there are other issues in this case).
My issue is why 'Keep Flag' is not working as expected when used with first calculation view?
Regards
Jitendra
Hi Jitendra,
If you create calculation view with "Multi Dimensional Reporting" is Enabled,
CV will be created with Default Aggregation Node.
Though you set Keep Flag Property in Default Aggregation mode, It will behave as
Calculate After Aggregation only.
So I created Default Projection node CV and Connected Aggregation node (keep flag property is set) into Projection node.
For your requirement, please try this flow.
Aggregation (Keep Flag Property Set) --> Projection --> Default Aggregation Node (Counter Creation)
--> Semantics.
I think it might resolve both the Requirements.
1. Calculate Before Aggregation
2. Counter Creation.
Regards,
Muthu
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.