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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Dynamic Color visualization

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. 

2 ACCEPTED SOLUTIONS
negi007
Community Champion
Community Champion

@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

negi007_2-1654168151857.png

 

i have created below visual where header background will change basis selection in the country slicer.

 

negi007_3-1654168213787.png

i have set the background color condition like below 

 

negi007_1-1654168130635.png

let me know if it helps you

 




Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

View solution in original post

Anonymous
Not applicable

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 theme

Dynamic Themes Based on Slicer Selection

Dynamically change theme from data/slicer selection

slicer themes

 

 

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")

Eyelyn9_0-1654571488210.png

Eyelyn9_1-1654571591455.png

Eyelyn9_2-1654571690049.png

 

 

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.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

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 theme

Dynamic Themes Based on Slicer Selection

Dynamically change theme from data/slicer selection

slicer themes

 

 

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")

Eyelyn9_0-1654571488210.png

Eyelyn9_1-1654571591455.png

Eyelyn9_2-1654571690049.png

 

 

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.

negi007
Community Champion
Community Champion

@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

negi007_2-1654168151857.png

 

i have created below visual where header background will change basis selection in the country slicer.

 

negi007_3-1654168213787.png

i have set the background color condition like below 

 

negi007_1-1654168130635.png

let me know if it helps you

 




Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

Anonymous
Not applicable

 

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.

 

Question for visuals.png

Anonymous
Not applicable

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors