Forum Discussion

Mumin192's avatar
Mumin192
Helper I
3 years ago
Solved

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]) ...
  • Greg_Deckler's avatar
    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")