Forum Discussion
Mumin192
3 years agoHelper I
Highlight the max value in a chart
Hello I'm trying to highlight the maximum count by age in my data I used this measure Max Value = var allthedatesused = ALLSELECTED(prf[Age]) var themaxvalue = MAXX(allthedatesused, [TotalPRF]) ...
- 3 years ago
Mumin192 Here is one possible fix, updated PBIX is attached.
Max Value2 = var __table = ADDCOLUMNS( SELECTCOLUMNS(ALLSELECTED(age[Age]),"AgeAge",[Age]), "__TotalPRF",COUNTROWS(FILTER(ALL('PRF'),'PRF'[Age] = [AgeAge])) ) var themaxvalue = MAXX(__table, [__TotalPRF]) return IF([TotalPRF] = themaxvalue,"#000000")
Greg_Deckler
3 years agoCommunity Champion
Mumin192 Here is one possible fix, updated PBIX is attached.
Max Value2 =
var __table =
ADDCOLUMNS(
SELECTCOLUMNS(ALLSELECTED(age[Age]),"AgeAge",[Age]),
"__TotalPRF",COUNTROWS(FILTER(ALL('PRF'),'PRF'[Age] = [AgeAge]))
)
var themaxvalue = MAXX(__table, [__TotalPRF])
return
IF([TotalPRF] = themaxvalue,"#000000")