5 Replies Latest reply on Jul 19, 2016 8:40 AM by Naveen Agarwal

# How to apply different calculation at different hierarchy level?

I am trying to show a participation number by different hierarchy level, but at different level requires different calculation.

My hierarchy has, from top to bottom, region -> area -> building -> center, I also have participation number by day by center. Participation number on "center" level is calculated as average of daily number, but the building, area, and region level should be calculated as sum of center level. Anyway I can define different calculation based on different hierarchy level?

• ###### 1. Re: How to apply different calculation at different hierarchy level?

You could create a Calculated Field to have values as the sum of center level numbers. Then apply the calculation to this field.

Another way could be to use LOD expressions.

• ###### 2. Re: How to apply different calculation at different hierarchy level?

I have tried LOD, but can't figure out how... I have created a sample file, can you kindly show me? I am showing the average of participation number by center, but once I go to the higher levels, I would like to see sum instead of avg.

• ###### 3. Re: How to apply different calculation at different hierarchy level?

See calculated numbers below - is this what you expect?

I setup two calculations as below:

• ###### 4. Re: How to apply different calculation at different hierarchy level?

Not really... I am hoping to expand and collapse the hierarchy level, and show one participation number per row accordingly based on the hierarchy level status. For example, if it's expand to center level, the number should show as avg of daily, if collapse to region level, the number should show as sum of the level below.

• ###### 5. Re: How to apply different calculation at different hierarchy level?

Ok - here is a partial answer. If you use the following modified calculation, it will show SUM at Bldg-Area-Region levels when you drill down in the hierarchy.

{FIXED [Bldg],[Area],[Region]: SUM([Partcipation Number])}

I am not sure how to dynamically change the aggregation from SUM to AVG when you drill down to Center level. Hopefully someone else can take a shot at it.