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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
jcastr02
Post Prodigy
Post Prodigy

Customize one visual only theme

themes.pngI have a general blue theme selected for my report.  HOwever, I have one visual that I would like it to be in different color, this case red and add different shades of red as the months progress.  Is there a way I can just change the theme of the one visual?  Otherwise I'll have to manually go in to change to different shades of red.  It defaulted to a blue color when 4/1/21 was added.  See pic below.  

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@jcastr02 

You should be able to use conditional formatting to override the theme colors.

First, we will need a measure that read a value from the dates table to determine what shade of red to use.  In mine I use the month number (1-12) to pick the shade of red.

Bar Format = 
VAR _Month = MAX(Dates[Month Number])
RETURN
    SWITCH(
        _Month,
        1,"#ff0000",
        2,"#ffa07a",
        3,"#f08080",
        4,"#fa8072",
        5,"#e9967a",
        6,"#ff6347",
        7,"#cd5c5c",
        8,"#ff4500",
        9,"#dc143c",
        10,"#b22222",
        11,"#8b0000",
        12,"#800000"
    )

It is important to make sure the format of this measure is set to Text.

jdbuchanan71_0-1617204938654.png

Then, it the data color for the bar chart go to conditional formatting.

jdbuchanan71_1-1617204995473.png

And set the formatting to Format By: Field Value, Based on field: Bar Format.  'Bar Format' is the name of the measure we created with the color switches.

jdbuchanan71_2-1617205134570.png

And here is the result:

jdbuchanan71_3-1617205184119.png

 

 

View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

@jcastr02 

You should be able to use conditional formatting to override the theme colors.

First, we will need a measure that read a value from the dates table to determine what shade of red to use.  In mine I use the month number (1-12) to pick the shade of red.

Bar Format = 
VAR _Month = MAX(Dates[Month Number])
RETURN
    SWITCH(
        _Month,
        1,"#ff0000",
        2,"#ffa07a",
        3,"#f08080",
        4,"#fa8072",
        5,"#e9967a",
        6,"#ff6347",
        7,"#cd5c5c",
        8,"#ff4500",
        9,"#dc143c",
        10,"#b22222",
        11,"#8b0000",
        12,"#800000"
    )

It is important to make sure the format of this measure is set to Text.

jdbuchanan71_0-1617204938654.png

Then, it the data color for the bar chart go to conditional formatting.

jdbuchanan71_1-1617204995473.png

And set the formatting to Format By: Field Value, Based on field: Bar Format.  'Bar Format' is the name of the measure we created with the color switches.

jdbuchanan71_2-1617205134570.png

And here is the result:

jdbuchanan71_3-1617205184119.png

 

 

amitchandak
Super User
Super User

@jcastr02 , I doubt you can do that, Change the color for this visual manually. That will not change by theme change post that.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.