The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
We have a 100% stacked column chart with Year in x-axis , Duration (Hours) in y-axis and Category as legend.
We have an independent table which has color codes associated with categories, specific color code for each category.
The expectation is to apply conditional formatting for the legend based on this color code field value, so that the categories will have unique, pre-defined colors in the visual. But power bi doesn’t support conditional formatting for legend. Pleas let us know if this could be achieved.
Sample screenshots provided below.
Solved! Go to Solution.
@nandhini2607 legend colors are based on the visual colors (in this case bars), if you apply conditional formatting on the visual, legend color will follow that.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @parry2k ,thanks for the quick reply, I'll add further.
Hi @nandhini2607 ,
Unfortunately, it is now only possible to set conditional formatting for single bar charts. That means stacked charts are not supported.You can vote for the idea here.
https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=5de734fa-3a3f-4228-9aa5-7deebea5615c
1.You can manually set the color of the legend here.
2.Modify your visual objects according to this.(See the .pbix file for more details)
Hi @parry2k ,thanks for the quick reply, I'll add further.
Hi @nandhini2607 ,
Unfortunately, it is now only possible to set conditional formatting for single bar charts. That means stacked charts are not supported.You can vote for the idea here.
https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=5de734fa-3a3f-4228-9aa5-7deebea5615c
1.You can manually set the color of the legend here.
2.Modify your visual objects according to this.(See the .pbix file for more details)
@Anonymous Thank you for your valuable inputs
@nandhini2607 legend colors are based on the visual colors (in this case bars), if you apply conditional formatting on the visual, legend color will follow that.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
User | Count |
---|---|
69 | |
63 | |
59 | |
55 | |
28 |
User | Count |
---|---|
183 | |
80 | |
62 | |
46 | |
38 |