cancel
Showing results for 
Search instead for 
Did you mean: 

Keep Flag Not Working

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

muthuram_shanmugavel2
Contributor
0 Kudos

Hi Jitendra,

Select Data Category (will be in CV Semantics layer - Properties Panel) as Hidden from Reporting Tools Option.

After activation Please check the values.

Former Member
0 Kudos

Hi Muthuram,

I changed this setting from Cube to Blank but it is still the same.

Regards

Jitendra

muthuram_shanmugavel2
Contributor
0 Kudos

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

Former Member
0 Kudos

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

muthuram_shanmugavel2
Contributor
0 Kudos

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