Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
bob57
Helper IV
Helper IV

DAX Measure to Calculate Difference.

Hello,

I need a DAX measure that will produce the column, DiffFromBlue, shown in Table 2. The column must display the difference in the Rating column from Tee Blue. For example, for Pebble Beach from the Black tee the difference is 2.9 or the Black Tee Rating (75.5) minus the Blue Tee Rating (72.6). Another example: for Spyglass Hill from the White tee the difference is -1.9 or the White Tee Rating (71.7) minus the Blue Tee Rating (73.6).

On the surface, this problem seems simple enough, but the solution escapes me.

Thank you for your time.

bob57_1-1643919146266.png

 

 

1 ACCEPTED SOLUTION
tackytechtom
Super User
Super User

Hi @bob57 ,

 

If this is the outcome you wish for...

tomfox_0-1643920869419.png

 

... then I have a possible solution for you:

DiffFromBlue = 
VAR _valueBlue = 
CALCULATE (
    MAX ( TeaTable[Rating] ),
    ALLEXCEPT ( 'TeaTable', 'TeaTable'[CourseName] ),
    TeaTable[Tee] = "Blue"
)

RETURN
MAX ( TeaTable[Rating] ) - _valueBlue

 

Hope this helps! 🙂

 

/Tom

https://www.tackytech.blog

https://www.instagram.com/tackytechtom

 



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

View solution in original post

2 REPLIES 2
bob57
Helper IV
Helper IV

That did the trick! Thank you so much,

Bob

tackytechtom
Super User
Super User

Hi @bob57 ,

 

If this is the outcome you wish for...

tomfox_0-1643920869419.png

 

... then I have a possible solution for you:

DiffFromBlue = 
VAR _valueBlue = 
CALCULATE (
    MAX ( TeaTable[Rating] ),
    ALLEXCEPT ( 'TeaTable', 'TeaTable'[CourseName] ),
    TeaTable[Tee] = "Blue"
)

RETURN
MAX ( TeaTable[Rating] ) - _valueBlue

 

Hope this helps! 🙂

 

/Tom

https://www.tackytech.blog

https://www.instagram.com/tackytechtom

 



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (2,340)