Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hello experts,
If I have a slicer for country, and If I click India, then the color of visuals become Red, then if I click China, then color of viusulas become Blue, How I can do that in Powerbi.
Solved! Go to Solution.
@Anonymous i am not clear where you wish to have the condinal color. but let's say you have a visual and you wish to change the header background color change basis selection in the slicer
let's say i have a data like below and last column value to be used to change the color dynmically
i have created below visual where header background will change basis selection in the country slicer.
i have set the background color condition like below
let me know if it helps you
Proud to be a Super User!
Hi @Anonymous ,
To my knowledge, report themes could not be dynamically changed based on different selections/filters.
Ideas similar with what you expect have been submitted in the following links, please vote them up and you can add comments. Hopes Power Bi will implement this in nearby future.
Dynamic Themes Based on Slicer Selection
Dynamically change theme from data/slicer selection
My workaround is to create a color measure ,and then apply it to each visual's Value Color field.
Measure = SWITCH( SELECTEDVALUE('Table'[Country]) ,"India","Red","China","Blue","UK","Yellow")
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
To my knowledge, report themes could not be dynamically changed based on different selections/filters.
Ideas similar with what you expect have been submitted in the following links, please vote them up and you can add comments. Hopes Power Bi will implement this in nearby future.
Dynamic Themes Based on Slicer Selection
Dynamically change theme from data/slicer selection
My workaround is to create a color measure ,and then apply it to each visual's Value Color field.
Measure = SWITCH( SELECTEDVALUE('Table'[Country]) ,"India","Red","China","Blue","UK","Yellow")
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous i am not clear where you wish to have the condinal color. but let's say you have a visual and you wish to change the header background color change basis selection in the slicer
let's say i have a data like below and last column value to be used to change the color dynmically
i have created below visual where header background will change basis selection in the country slicer.
i have set the background color condition like below
let me know if it helps you
Proud to be a Super User!
for Example this visula, I have more than 10 countries in slicer, is there dax code can make when I click in slicer in each counrtym it give the color that definded befor for each country.
Example:
India - all visulas will be in red color.
China - all visulas will be in Blue color.
and so on.
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 48 | |
| 46 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 70 | |
| 69 | |
| 32 | |
| 27 | |
| 26 |