Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
10 years ago

PowerBI Bar Chart

hi Guys,

I have below data;

Category stage1 stage2 stage3

Cat1             1        1          1

Cat2             1        2          2

Cat3             1        2          3

My Stacked graph should have 3 colors Stage 1 always yellow, Stage 2 if matched with stage 1 then green else red Stage 3 if matched with stage 2 green else red..

 

How can I achieve above graph in Powerbi?

 

Regards,

Navin

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous conditional formatting is not available in bar charts currently, so there's no way to change colors based on a formula like that. If those numbers are columns in a table and not the results of measures, maybe you could come up with another custom column that does the comparison, and then use that column in the legend of your chart, but otherwise I don't think there is any way to get the results you're describing.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous,

    Regarding to the above conditional formatting issue in Power BI, you can vote it and add your comment in this idea: https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/9588453-conditional-formatting-throughout .

    Moreover, as a workaround to this issue, you can create bar chart in SQL Server 2016 Reporting Services and add conational formatting in the bar chart, then pin the Reporting Services report item to Power BI Dashboard. For more information, please check the following articles.

    Adding Conditional Formatting (Reporting Services)
    Pin Reporting Services items to Power BI Dashboards


    Thanks,
    Lydia Zhang