Forum Discussion

BHAVIKCHAWLA's avatar
BHAVIKCHAWLA
New Member
2 years ago
Solved

Understanding DAX

I am little new to Power BI and am finding little difficulty in understanding some concepts. I was working - Highlighting max bars. I am applied this logic -  Maximum Value =                 Var...
  • Jihwan_Kim's avatar
    2 years ago

    Hi,

    I am not sure how your semantic model looks like, but please try something like below.

    I think it needs context transition in the measure.

     

    Maximum Value =
    VAR MaxVal =
        MAXX ( ALL ( 'table' ), CALCULATE ( SUM ( 'table'[column] ) ) ) //need context transition and CALCULATE function enables context transition
    VAR Color =
        IF ( SUM ( 'table'[column] ) = MaxVal, "Dark Blue", "Grey" )
    RETURN
        Color