Forum Discussion

joshua1990's avatar
joshua1990
Icon for Post Prodigy rankPost Prodigy
6 years ago
Solved

Conditional formatting rules for legend in a bar chart

Hello everyone!

I would like two to show our sales for each item in a bar chart.

Here I would like to differentiate the colors of the individual bars.
This means that items from area "A" are blue, items from area "B" are yellow, etc.

The Item - Area relation is placed in our Item master

 

Is there any chance to add this feature to a bar chart?

  • joshua1990 add a new measure for color

     

    Bar Color = IF ( MAX ( 'Item'[Area] ) = "A" , "Blue", "Yellow" )

     

    go to format painter, click fx next to data color

     

     

    in conditional formatting choose your measure

     

     

    I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    ⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡

     

     

1 Reply

  • joshua1990 add a new measure for color

     

    Bar Color = IF ( MAX ( 'Item'[Area] ) = "A" , "Blue", "Yellow" )

     

    go to format painter, click fx next to data color

     

     

    in conditional formatting choose your measure

     

     

    I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    ⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡