Forum Discussion
How to get Average column to sum correctly
- 6 years ago
parry2k I manage to get the correct average per client to calculate and the correct totals in each column. The thing is I don't understand how or why this works. In addition, can you please elaborate more on your first post as to why the average don't simply work?
This was the formula I ended up using:
Average Hours Per Partner =if(hasonevalue(Sheet1[Personnel]),DIVIDE(SUM('Sheet1'[Total Hours]), [Number of Partners Worked on]),sumx(values(Sheet1[Personnel]),CALCULATE([Hours]/[Number of Partners Worked on])))
parry2k How would I fix the average column so that it totals correctly in that case?
zrnooredeen sorry I missed to post the DAX measure expression. here it is
Distinct Client (Revised) =
SUMX ( VALUES ( 'Table'[Person] ),
CALCULATE ( DISTINCTCOUNT ( 'Table'[Client] ) )
)
- zrnooredeen6 years agoRegular Visitor
parry2k I manage to get the correct average per client to calculate and the correct totals in each column. The thing is I don't understand how or why this works. In addition, can you please elaborate more on your first post as to why the average don't simply work?
This was the formula I ended up using:
Average Hours Per Partner =if(hasonevalue(Sheet1[Personnel]),DIVIDE(SUM('Sheet1'[Total Hours]), [Number of Partners Worked on]),sumx(values(Sheet1[Personnel]),CALCULATE([Hours]/[Number of Partners Worked on])))- v-lili6-msft6 years ago
Community Support
hi zrnooredeen
This looks like a measure totals problem. Very common. See this post about it
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907Regards,Lin