Forum Discussion
BHAVIKCHAWLA
2 years agoNew Member
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...
- 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
Jihwan_Kim
2 years agoSuper User
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