Forum Discussion
Issue with DAX Measure for Slicer Header Color Change
- 1 year ago
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:
- Instead of changing the slicer header color, use a card visual or text box to display a dynamic label or message styled using your DAX measure.
- Place the styled visual near the slicer for the desired effect.
This is a limitation of Power BI's current functionality.
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
- bhartisharma_in1 year agoFrequent Visitor
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!