4 Replies Latest reply on Sep 4, 2018 8:34 AM by Philipp Coenen

# calculate average across different measures

Hello

I'm looking to solve the following issue.

What: I need to calculate the average per product across a number of measures, Here Stock level1 ....5

 Material Classification Stock level 1 Stock level 2 Stock level 3 Stock level 4 Stock level 5 Average 2850 A 0 0 360 224 8 118 2853 A 5.259 1.619 7.130 679 1.399 3.217 2859 A 468 1.022 581 441 119 526 2862 B 0 0 0 0 0 0 2863 B 5.197 2.758 1.651 4.575 5.454 3.927 2864 B 4.015 1.612 2.964 2.409 4.289 3.058 2868 C 403 250 480 242 426 360 2869 C 50 40 42 26 32 38 2870 C 0 0 25 0 43 14

The problem: Since the data I want to average is located in different measures I cannot simply use AVG ( [MEASURE]).

What I tried: I tried  {FIXED [ Product ] : Sum (Sum ([measure1], Sum ([measure2])....)}/ number of measures wich doesn't seem to work here.

How do i need to approach this ?

Best regards and thanks a lot in advance,

Philipp

• ###### 1. Re: calculate average across different measures

hi Philipp

Try this. I have added divided by 5, because your measures count is 5 here. no way to count any other. but result is coming well.

{FIXED [Classification],[Material]: SUM([Stock level 1])+SUM([Stock level 2])+SUM([Stock level 3])+SUM([Stock level 4])

+SUM([Stock level 5])}/5

Another approach to pivot all measures first and then use the calculation to divide the count (pivot names)

{FIXED [Classification],[Material]: SUM([Pivot Field Values])/COUNT([Pivot Field Names])}

Attached workbook

Thanks

sankar

• ###### 2. Re: calculate average across different measures

HI Philip,

You can try below approach:

Avg =

(sum([Stock level 1])+

sum([Stock level 2])+

sum([Stock level 3])+

sum([Stock level 4])+

sum([Stock level 5]))/5

1 of 1 people found this helpful
• ###### 3. Re: calculate average across different measures

Thank you for your help. yes this worked !

Cheers

Philipp

• ###### 4. Re: calculate average across different measures

Thank you for your help. yes this worked !

Cheers

Philipp