Search code examples
powerbiformattingrenamelegendlegend-properties

Is there a way to rename the categories of the legend?


I'm looking for a way to change the name of the legend of the graph without changing the data?

enter image description here

enter image description here


Solution

  • Unfortunately, you can't do this directly in the format page. You'll either have to create another column that contains a user-friendly name for your data. Then use that as the legend.

    Ex.

    Legend = SWITCH(
        TRUE, 
        Table[Lag Days] <= 3, "Low", 
        Table[Lag Days] <= 7, "Medium", 
        Table[Lag Days] <= 30, "High", 
        "Extreme"
    )
    

    Or maybe use grouping to create the legend names that you would like.