Forum Discussion

rohitMe's avatar
rohitMe
Advocate I
8 years ago
Solved

Custom Legend

Hi,   I want to create a visualisation that is similar to the one given below:   I require the percentage of "Out City" entries for each zones and want the legend to show details as sho...
  • v-juanli-msft's avatar
    8 years ago

    Hi rohitMe

    Create calculated columns

    percentage =
    CALCULATE (
        COUNT ( Sheet3[category] ),
        FILTER ( ALLEXCEPT ( Sheet3, Sheet3[zones] ), [category] = "O" )
    )
        / CALCULATE ( COUNT ( Sheet3[category] ), ALLEXCEPT ( Sheet3, Sheet3[zones] ) )
    flag1 = IF([percentage]>0.4,"up","down")

    Add column "flag1" in the Legend field, "percentage" in the Value field

     

     

    Best Regards

    Maggie