Forum Discussion

IG2023's avatar
IG2023
Frequent Visitor
3 years ago
Solved

Conditional Formatting for Bars/Columns for Stacked/Clustered bar/column charts

Hello All, I am writing to see if any of you has a solution for a PowerBI random behaviour. I created calculated measures in my data model, I want to display them on a bar/column chart (stacked or clustered) and assign a colour depending on their value (conditional formatting). The conditional formatting for the bars/columns seems to be available only in one case, if there is only one calculated measure in the X-axis and one non-calculated value in the Y-axis (first pic). If I add two calculated measures in the X-axis (keeping the non-calculated value in the Y-axis, second pic) or if I remove the calculated value altogether from the Y-axis (third pic), the conditional formatting for the bars/columns disappears. I don't understand why, any idea how to work around this? I would like to display the calculated measures in one bar or column chart and be able to use conditional formatting for all of bars/columns. I am using PowerBI desktop, December 2022 version. 

 

 

 

 

 

 

 

 

 

  • Hi IG2023 

     

    Unfortunately this is how it works.  You can only use CF if there's 1 value on the x-axis.  

     

    Regards

     

    Phil

     

2 Replies

  • IG2023's avatar
    IG2023
    Frequent Visitor

    Thanks for your reply! Conditional formatting for multiple values in x-axis would be a very nice feature to have in next PowerBI versions..

  • Hi IG2023 

     

    Unfortunately this is how it works.  You can only use CF if there's 1 value on the x-axis.  

     

    Regards

     

    Phil