Reply
JLambs20
Helper III
Helper III
Partially syndicated - Outbound

Difference between one value and average of all values using DAX

Hello, I need help with what seems like a straight-forward problem.  I simply need to divide an individual weight (green highlight) by a group of value's average (yellow).  So in this example, I need the "Change" column to be the difference between the weight of Value 1 and the Average of all of the values.

JLambs20_0-1695849544542.png

Thank you!

1 ACCEPTED SOLUTION
CoreyP
Solution Sage
Solution Sage

Syndicated - Outbound

You can create a measure using ALLSELECTED to remove the row level context. Something like this should work:

Change = DIVIDE( SUM( Weight ) , CALCULATE( AVERAGE( Weight ) , ALLSELECTED( Value ) ) , BLANK() )

View solution in original post

2 REPLIES 2
JLambs20
Helper III
Helper III

Syndicated - Outbound

That worked perfectly! Thank you so much!

CoreyP
Solution Sage
Solution Sage

Syndicated - Outbound

You can create a measure using ALLSELECTED to remove the row level context. Something like this should work:

Change = DIVIDE( SUM( Weight ) , CALCULATE( AVERAGE( Weight ) , ALLSELECTED( Value ) ) , BLANK() )

avatar user

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)