Forum Discussion
New Button Slicer (November 2023 Update)- Conditional Formatting
Hey, I was trying to get this to work too using measures.
My theory is nothing is selected in the button slicer so cannot set the value based on selection.
For example:
1. I use a simple measure to set the fill colour when selected. This works as not based on selecting an actual button value.
2. Now try a measure based on selecting a value.
It works!!!!
So I just have to filter the slicer to change the button colour to apply conditional formatting ;).
I have tried different options i.e. hasonevalue, but I guess the thing with that button is it isn't actually being filtered to one value to enable setting to a colour. Also tried switching based on values but just set to the last colour in the statement.
Missing something with the dax.
- JD092 years agoAdvocate I
Hi tcbassett ,
Thanks for the Revert!!
Have tried this approach, It Only return the HEX Code, but it does not fill the Button as required.- tcbassett2 years agoFrequent Visitor
Sorry JD09 wasn't posting as a fix. I think this is a bug with the new slicer button. Just showing what I tried and didn't work for me. Same issue as when you tried the conditional formatting based on a column - always sets to the first value as nothing is selected on a button.
My work around was to use an image. I couldn't get a complete fill but I'm using the coloured dot in place of legend on the graph. Good enough for me.
It's a similar measure to what I tried for the fill but it actually works to switch the image??
This video shows switching the images if it helps. NEW Button Slicers in Power BI | 3 Examples You Don’t Want to Miss! - YouTube