Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi everyone,
I’m facing an issue with applying a DAX measure to change the color of a slicer header in Power BI. Here’s the DAX measure I’m using:
color change = IF(ISFILTERED(Product[Category]), "Red", "Blue")
When I apply this measure to the color field of the header font, the color does not change upon selecting a category. However, if I test the same measure with a text box, the color field changes as expected according to the DAX.
Has anyone else encountered this issue or have any suggestions on how to resolve it?
Any help would be much appreciated! 😊
Solved! Go to Solution.
Slicer headers in Power BI currently do not support dynamic formatting through DAX measures. This feature works for visuals like text boxes but not slicer headers.
Workaround:
This is a limitation of Power BI's current functionality.
Hi @bhartisharma_in,
Thanks for posting your query in Microsoft fabric community forum.
Could you please confirm if your query have been resolved the solution provided by @rohit1991 & @suparnababu8 ? If they have, kindly mark the helpful response and accept it as the solution. This will assist other community members in resolving similar issues more efficiently.
Thank you.
Slicer headers in Power BI currently do not support dynamic formatting through DAX measures. This feature works for visuals like text boxes but not slicer headers.
Workaround:
This is a limitation of Power BI's current functionality.
Thanks for the tip!
I’m using this workaround too, and it’s working great for me. Hopefully, Power BI will support dynamic formatting for slicer headers soon. 😊
I think Power BI does not support dynamic color changes for slicer headers using DAX measures. The reason your conditional formatting is not working is because you are trying to apply the formatting to the slicer itself, based on the selections made within that same slicer. This creates a conflict, as the slicer cannot dynamically change its own header color based on its selections.
If you want, you can create an additional category slicer. Use this new slicer to filter the existing slicer. Now, the header color of your existing slicer will change because the selected value from the new slicer is being applied to the existing slicer.
If you see above image I created existing slicer in black color and one more slicer in Red color. Now If I select South in new slicer it'll change the existing slicer value. Pls see the below pic.
I hope you are clear now. If this solution is found correct Please mark my answer ac accepeted soltuion. Thanks
Hi @suparnababu8 ,
Thanks for the suggestion! I initially considered this approach, but it won’t work for my report because having too many slicers will slow it down significantly. I’m currently using a workaround with card visuals to display dynamic labels, which is working well for now.
Thanks again for your help!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
28 | |
26 | |
22 | |
22 | |
18 |
User | Count |
---|---|
52 | |
34 | |
28 | |
24 | |
21 |