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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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