Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply

Is there a way to enable/disable conditional formatting via DAX/slicer

Hi,

 

Is there a way to create a slicer, that will enable or disable "conditional formatting" at some or all columns ?

 

We have a matrix. Some users like to see data with conditional (color)formatting, some don't. Is there a way to remove the conditional formatting via a DAX formula & slicer at the report, so users can toggle it on or off? 

 

(I want conditional background color to be a choice of user:)

on-off.png

 

Thanks in advance 

2 ACCEPTED SOLUTIONS
mhossain
Solution Sage
Solution Sage

@jelleschuurman 

 

1). Yes it's doable, you can create a Enter data table with on off value, and create a measure for conditional formatting, something like below

if(slicer value = "On", SUM(value field), "-")

And then in the conditional format choose above measure in the "Base on field"

Above will work, or share your sample file if above is not clear.

 

2). Alternatively bookmark can be used.

 

Hope this helps.

View solution in original post

Bookmarks are used for several purposes. In this particular case, you can set up bookmarks to deliver specific content in a page, and then use buttons to trigger individual bookmarks. 

For example, in this report page I have two matrices: one has conditional formatting and the other hasn't. They are overlayed. Add "toggle" buttons and set up bookmarks to show/hide the corresponding visuals:

Bkm Off.JPGBkm ON.JPG

 

You then set the action for each toggle image to trigger the corresponding bookmark and you get this:

toggle.gif

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

6 REPLIES 6
PaulDBrown
Community Champion
Community Champion

From @mhossain suggestions, I would vote for the bookmark option with a "toggle" button





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Hi PaulDBrown,

What is the "bookmark"? I don't know it (or don't know the correct translation)

Bookmarks are used for several purposes. In this particular case, you can set up bookmarks to deliver specific content in a page, and then use buttons to trigger individual bookmarks. 

For example, in this report page I have two matrices: one has conditional formatting and the other hasn't. They are overlayed. Add "toggle" buttons and set up bookmarks to show/hide the corresponding visuals:

Bkm Off.JPGBkm ON.JPG

 

You then set the action for each toggle image to trigger the corresponding bookmark and you get this:

toggle.gif

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Thank you 🙂

 

I think both cases are in my usecase a lot of work. We have a lot of measures in the matrix (40+ measures split over 3 matrices in 1 page. 15-20 have conditional formatting). 

 

With the measure option i have to rewrite all the measures, and with bookmarks all matrices are essentialy double in the report.

 

Is there a way to connect directly to the fields in a matrix/visual so you can tell the data to 'ignore' conditional formatting,  like the ALL() function does with filters/slicers? 

mhossain
Solution Sage
Solution Sage

@jelleschuurman 

 

1). Yes it's doable, you can create a Enter data table with on off value, and create a measure for conditional formatting, something like below

if(slicer value = "On", SUM(value field), "-")

And then in the conditional format choose above measure in the "Base on field"

Above will work, or share your sample file if above is not clear.

 

2). Alternatively bookmark can be used.

 

Hope this helps.

Hi mhossain,

 

I think I understand your solution. Your answer in combination with parts of this source I just found, made me understand how to do this 🙂

 

I missed this part when reading your answer: "And then in the conditional format choose above measure in the "Base on field"". Your answer is the solution 🙂 thank you

 

Thank you 🙂 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.