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
giuliapiazza94
Helper IV
Helper IV

Different color column each month

Hi guys,

I have a matrix like this

giuliapiazza94_0-1642073959351.png

 

I'd like to have a different color for each month

In each month I've 2 measures, so they have to have the same color in the same month.

 

It is possibile?

Thank you all 😁

 

1 ACCEPTED SOLUTION
ValtteriN
Super User
Super User

Hi,

You can create a formatting measure like this:

ColorMeasure =
var selection = MONTH(SELECTEDVALUE(MonthColors[Date])) return
SWITCH(TRUE(),
selection=1,"Blue", //January
selection=2,"Green") //And so on, instead of color names you can also use hexacodes e.g. "FFFFFF"



Apply it here:

ValtteriN_0-1642075449704.png

 

ValtteriN_1-1642075471678.png

End result:

ValtteriN_2-1642075512855.png


Then you just need to apply the logic to other columns and the logic works.

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!






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

Proud to be a Super User!




View solution in original post

5 REPLIES 5
ValtteriN
Super User
Super User

Hi,

You can create a formatting measure like this:

ColorMeasure =
var selection = MONTH(SELECTEDVALUE(MonthColors[Date])) return
SWITCH(TRUE(),
selection=1,"Blue", //January
selection=2,"Green") //And so on, instead of color names you can also use hexacodes e.g. "FFFFFF"



Apply it here:

ValtteriN_0-1642075449704.png

 

ValtteriN_1-1642075471678.png

End result:

ValtteriN_2-1642075512855.png


Then you just need to apply the logic to other columns and the logic works.

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!






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

Proud to be a Super User!




Could this be used for column headers? I can't seem to find a way to do it.

There is a small problem

giuliapiazza94_0-1642078181733.png

 

How can I color all column?

 

Hi,

These rows are likely caused by interaction between row level filters -> these rows don't have values in the month column so this happens. 





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

Proud to be a Super User!




Thank you so much 😊

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.