Forum Discussion
Calculating correct Average
- 1 year ago
Kelvin_Aurelio - As long as I understand what you're trying to do correctly, use this (just refit to your table name):
AVERAGEX( VALUES( 'Table'[ID Project] ), CALCULATE(AVERAGE( 'Table'[Score] ), REMOVEFILTERS( 'Table'[ID Rating]) ))PBIX attached to show you my results are correct - your expected 29.5 for Project 1 is incorrect.
If I answered your question please mark my post as the solution, it helps others with the same challenge find the answer!
- 1 year ago
Hello Kelvin_Aurelio
You can use the following DAX to create a calculated column that will give you the correct average.
Average Actual = AVERAGEX ( FILTER ( 'Table', 'Table'[ID Project] = EARLIER ( 'Table'[ID Project] ) ), 'Table'[Score] )Please note that based on your dataset, the project-1 average is 28
Here is the screenshot of the calculated column along with the DAX:
I am also attaching the Power BI file for your reference.
Best Regards,
Udit
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudo 👍
🚀 Let's Connect: LinkedIn || YouTube || Medium || GitHub
✨ Visit My Linktree: LinkTree
Proud to be a Super User
Hello Kelvin_Aurelio
You can use the following DAX to create a calculated column that will give you the correct average.
Average Actual =
AVERAGEX (
FILTER ( 'Table', 'Table'[ID Project] = EARLIER ( 'Table'[ID Project] ) ),
'Table'[Score]
)
Please note that based on your dataset, the project-1 average is 28
Here is the screenshot of the calculated column along with the DAX:
I am also attaching the Power BI file for your reference.
Best Regards,
Udit
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudo 👍
🚀 Let's Connect: LinkedIn || YouTube || Medium || GitHub
✨ Visit My Linktree: LinkTree
Proud to be a Super User
- Kelvin_Aurelio1 year agoNew Member
It worked here, thanks!