Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 143 | |
| 123 | |
| 100 | |
| 80 | |
| 55 |