cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Conditonal Formatting with Rules and Theme

Hello to all!

Ill get straight to the point.
Have created multiple visuals while using a power Bi theme. Since I want to introduce conditional formatting I have the below issue:

- With JSON, I cannot set a custom conditional formatting based on rules. Which rules need to be different depending on the measures Im having in different visuals.

How I could use conditional formatting with rules with power Bi themes? (I cant throught the "traditional" path).
OR. How I can "revert" this current file to the standard theme? (basically no theme and obviously without rebuilding the whole data model!!). <- this way I could do the conditionally formatting .

Thank you in advance!
😀

2 REPLIES 2
Super User IV
Super User IV

@Ystamos , I doubt that you can do conditional formatting rule using the theme.

But if you have a common rule you can create color measure/s and use that in conditional formatting using the "Field value" option.

 

To revert the theme. You need to click on the default themes (One should be the default one)

 

if needed

example of color measure, you can return hex code

color =
switch ( true(),
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity1" && sum('Table'[Value]) >500,"lightgreen",
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity2" && sum('Table'[Value]) >1000,"lightgreen",
// Add more conditions
"red"
)

 

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Hello!

Thank you very much for your answer!
I have reverted in the default theme but Im still facing the same issue (No fx button available in the data colors page).
Also I have tried in other power bi reports and regardless of the theme I choose, the functionality is present..

Any ideas? Is it a know bug or something?

Thank you,

Helpful resources

Announcements
secondImage

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

secondImage

Power BI Women

Join our monthly meetings and learning sessions.

secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors