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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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

4 REPLIES 4
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!




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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.