Hi,
Does any one has the syntax for OLAP rule to calculate Average at parent level?
Thanks,
Shivanand
Hi Shivanand,
as I see it, you will need two helper elements for your measure, say the "Base measure", one for the "Count" and one for the "Sum". Then on base level you'll calculate these two:
['Sum'] = B:['Base measure'];
['Count'] = B:['Base measure'] / ['Base measure'];
Then you can calculate the averages on C level:
['Base Measure'] = C: ['Sum'] / ['Count'];
Best Regards
Martin
Just a comment. I am always wary of creating calculations like this on C elements because other users / rules / use case may still expect the standard aggregation. The alternative is to have the result of the calculation in a new element like "Average Sales for Product Group".