Forum Discussion
madisonb
2 years agoFrequent Visitor
MAX function with multiple conditions for shape map
Hello, I am creating a shape map with a color saturation of the highest incentives for each state. I am ranking some incentives as more valuable than others (rank column). I want to create a mea...
- Anonymous2 years ago
Hi madisonb
Please try this:
Here I create a measure for your reference:MEASURE = VAR _currentState = SELECTEDVALUE ( 'Table'[State] ) VAR _MinRank = CALCULATE ( MIN ( 'Table'[Rank] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[State] = _currentState ) ) RETURN CALCULATE ( MAX ( 'Table'[High] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[State] = _currentState && 'Table'[Rank] = _MinRank ) )The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
2 years agoNot applicable
Hi madisonb
Please try this:
Here I create a measure for your reference:
MEASURE =
VAR _currentState =
SELECTEDVALUE ( 'Table'[State] )
VAR _MinRank =
CALCULATE (
MIN ( 'Table'[Rank] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[State] = _currentState )
)
RETURN
CALCULATE (
MAX ( 'Table'[High] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[State] = _currentState
&& 'Table'[Rank] = _MinRank
)
)
The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
madisonb
2 years agoFrequent Visitor
Anonymous
This appears to be working perfectly! Thank you so much for your help!