Forum Discussion
Conditional Formatting in Bar Chart not working as expected
Good Morning,
I configured conditional formatting for the total labels of a bar chart. These are the rules that i set:
I am 100% sure that the rule is based on the correct column so I do not understand why the -0,08M are shown in red and not in green. Any idea what the problem could be?
Hi , Anonymous
According to your description, You want to display the data label of Total. In the screenshot, you configured the conditional format settings and it seems that there is no problem. But it is difficult to locate the problem by taking screenshots alone.
I test it in my side , this is my test data and i an not sure if your data structure is like this:
I create a measure to get the sum of the value group by the axis.
Measure = CALCULATE( SUM('Table'[V1]) , 'Table'[Xaxis]= MAX('Table'[Xaxis]),ALL())
Then i put this measure to the "Custom data label" for this bar chart:
And then we can configure the color in "All" Series:
The result is as follows:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
1 Reply
- v-yueyunzh-msftCommunity Support
Hi , Anonymous
According to your description, You want to display the data label of Total. In the screenshot, you configured the conditional format settings and it seems that there is no problem. But it is difficult to locate the problem by taking screenshots alone.
I test it in my side , this is my test data and i an not sure if your data structure is like this:
I create a measure to get the sum of the value group by the axis.
Measure = CALCULATE( SUM('Table'[V1]) , 'Table'[Xaxis]= MAX('Table'[Xaxis]),ALL())
Then i put this measure to the "Custom data label" for this bar chart:
And then we can configure the color in "All" Series:
The result is as follows:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly