Forum Discussion
Need a help on conditional formatting
- 1 year ago
Hi Krushnab_85
Thanks for reaching out to Microsoft Fabric Community Forum.
grazitti_sapna Thanks for your prompt response. In addition to that- Currently, Power BI does not support conditional formatting for Y-axis labels (like hospital names) in built-in visualizations such as stacked bar charts. we cannot dynamically change the font color of axis labels based on values like the number of registrations.
- However, as a workaround, you can apply conditional formatting to the bars themselves. For example, you can color the bar red when the number of registrations is 0 — this visually highlights those hospitals even though the Y-axis label color remains unchanged.
Below is the expected output :
If a community member's response addressed your query, please consider marking it as Accepted Answer and click Yes if you found it helpful.
If you have any further questions, feel free to reach out.
Thank you for being a valued member of the Microsoft Fabric Community Forum!
Hi Krushnab_85 ,
You're on the right track! In Power BI, you can apply conditional formatting to certain elements, but unfortunately, dynamic font color for the Y-axis labels (like hospital names on the Y-axis in a stacked bar chart) is not natively supported as of now
BUT — here's what you can do to work around it and still achieve a very similar result.
RegistrationFlagColor =
IF(SUM(Registrations[Count]) = 0, "Red", "Black")
In a Table visual, add:
-
Hospital Name
-
Registration Count
Apply conditional formatting to the Hospital Name column:
-
Click the column dropdown > Conditional formatting > Font color
-
Choose Format by = Field value, and pick
RegistrationFlagColor
🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
🎖 As a proud SuperUserand Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
🔗 Curious to explore more? [Discover here].
Let’s keep building smarter solutions together!
- Krushnab_851 year agoRegular Visitor
Hi GR Thanks for replying.. Its not working can you please recheck and if it works share me the file
- v-aatheeque1 year ago
Community Support
Hi Krushnab_85
Thanks for reaching out to Microsoft Fabric Community Forum.
grazitti_sapna Thanks for your prompt response. In addition to that- Currently, Power BI does not support conditional formatting for Y-axis labels (like hospital names) in built-in visualizations such as stacked bar charts. we cannot dynamically change the font color of axis labels based on values like the number of registrations.
- However, as a workaround, you can apply conditional formatting to the bars themselves. For example, you can color the bar red when the number of registrations is 0 — this visually highlights those hospitals even though the Y-axis label color remains unchanged.
Below is the expected output :
If a community member's response addressed your query, please consider marking it as Accepted Answer and click Yes if you found it helpful.
If you have any further questions, feel free to reach out.
Thank you for being a valued member of the Microsoft Fabric Community Forum!- v-aatheeque1 year ago
Community Support
Hi Krushnab_85
We haven’t heard back from you regarding our previous response and wanted to check if your issue has been resolved.
If it has, please consider clicking “Accept Answer” and “Yes” if you found the response helpful.
If you still have any questions or need further assistance, feel free to let us know — we're happy to help!Thank you!