Forum Discussion

bob57's avatar
bob57
Icon for Helper IV rankHelper IV
4 years ago
Solved

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 fro...
  • tackytechtom's avatar
    4 years ago

    Hi bob57 ,

     

    If this is the outcome you wish for...

     

    ... 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