Forum Discussion
tanmaym93
4 years agoFrequent Visitor
Average Calculation in Table Visual
Hi Community - I am trying to obtain the Average Headcount (in Average HC) column in a table visualization; however I need some help with the calculation. The average HC will be calculated as follo...
Anonymous
4 years agoNot applicable
Hi tanmaym93 ,
Is this result you want to achieve?
If it is, you can according to my testing process:
For easy calculation and clear understanding, I create an index column and two measures
- For index column, you can add it in power query
- The first measure is to calculate the Cumulative value:
You can try this measure:
Cumulative value = var _hc=SELECTEDVALUE('Table'[HC])
return SUMX(FILTER(ALL('Table'),'Table'[HC]<=_hc),'Table'[HC])
then you can get the Cumulative value:
3. The second measure is what you want to calculate—the average of HC
You can use this measure:
avg hc = 'Table'[Cumulative value]/SELECTEDVALUE('Table'[Index])
and finally , the result is as the above shows
Best regards,
Community Support Team Selina zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly