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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
aditya_141228
Helper I
Helper I

Color coding for a visual

aditya_141228_0-1718602972735.png

This is a visual that I'm using with Year column in legend

aditya_141228_1-1718603018117.png

 

Since there is only one year (2024) present in the Year column so I'm not able to change the color of these columns which are blue as default. Suggest a way to change the color of these columns. A single color will work too but I don't want this blue colored columns and as it oes not match with the look and feel of the dashboards.

 

Any help or suggestions will be appreciated. Thank You

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @aditya_141228 

What is the purpose of including the year in the legend if the analysis is only for one year?

Assuming that there is more than one year in the database and 2024 is currently displayed as a result of filtering, then you can remove the filter, change the color, and filter back again (the color will be preserved).

Ritaf1983_0-1718603777540.pngRitaf1983_1-1718603813884.png

 

The other option is to modify the theme's default colors

Ritaf1983_2-1718603899606.pngRitaf1983_4-1718603943606.pngRitaf1983_5-1718604005187.png

the pbix with the examples is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

5 REPLIES 5
rajendraongole1
Super User
Super User

Hi @aditya_141228 -you can try the approach provided by @Ritaf1983 , adding to that with conditional formatting column level color (fx) also you can able to change the color visual format.

as you mentioned one year, you can define a measure for year as below represent the color in visual pane as below:

 

create a new measure 

 

rajendraongole1_2-1718604919497.png

ColorMeasure = IF(MAX('financials'[Year]) = 2024, "#FF5733", "#33FF57")
 

 

rajendraongole1_0-1718603657193.png

 

 

you can use conditional formatting and define the color for your x axis

 

rajendraongole1_1-1718604860891.png

 

final result based on legend color , you can achieve this.

 

 

rajendraongole1_0-1718604841620.png

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

 

 





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

Proud to be a Super User!





Hi @rajendraongole1 

Please note that once you use a legend , you cannot apply conditional formatting...

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hello @Ritaf1983 -Agreed and i am aware of it.

In my snapshot if you can see i have added color measure for year, to show the difference with conditional formatting based on year instead of placing the year field on legend.

 

Thank you.

 

 





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

Proud to be a Super User!





aditya_141228
Helper I
Helper I

Actually currently I have data of only 2024 but in future we'll be having more data of different years and no filters are applied but default theme worked. This is the solution.

Ritaf1983
Super User
Super User

Hi @aditya_141228 

What is the purpose of including the year in the legend if the analysis is only for one year?

Assuming that there is more than one year in the database and 2024 is currently displayed as a result of filtering, then you can remove the filter, change the color, and filter back again (the color will be preserved).

Ritaf1983_0-1718603777540.pngRitaf1983_1-1718603813884.png

 

The other option is to modify the theme's default colors

Ritaf1983_2-1718603899606.pngRitaf1983_4-1718603943606.pngRitaf1983_5-1718604005187.png

the pbix with the examples is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.