Forum Discussion

SIH007_1's avatar
SIH007_1
Frequent Visitor
4 years ago
Solved

Format default visual (bar chart)

Hi, I have a bar chart, at the moment the user can filter it using a slicer - just 3 different departments. I would like to give the bars different colors depending on the selected department and show all 3 states on one sheet (see screenshot). According to Microsoft, formatting is pretty simple, but I can't find the item Data colors at all. 

  • SIH007_1 Step 1: First create a Measure like below  (As per your need) - If Proj ID is 1 so it will show Red and if 2 so it will show in Green.

     

    Measure Color = SWITCH(TRUE(),
    MAX('Proj Table'[Proj ID])=1, "Red",
    MAX('Proj Table'[Proj ID])=2,"Green"
    )
     
    Step 2: Use this measure in Color funtion of bar chart:

     

     

    Step 3: Then select Field option and use the Measure color:

     

    Step 4: Final result based on Proj ID slicer.

     
     

2 Replies

  • truptis's avatar
    truptis
    Community Champion

    Hi SIH007_1 ,

    The data colors option for bar chart is present here in the new update of Power BI:

    SIH007_1 -> Please mark it as a solution and hit the thumbs up if it helps you. Thanks.

  • SIH007_1 Step 1: First create a Measure like below  (As per your need) - If Proj ID is 1 so it will show Red and if 2 so it will show in Green.

     

    Measure Color = SWITCH(TRUE(),
    MAX('Proj Table'[Proj ID])=1, "Red",
    MAX('Proj Table'[Proj ID])=2,"Green"
    )
     
    Step 2: Use this measure in Color funtion of bar chart:

     

     

    Step 3: Then select Field option and use the Measure color:

     

    Step 4: Final result based on Proj ID slicer.