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
sshiny
Helper II
Helper II

Matrix-Column colour

Is it possible to give, all the sub-columns under April in a particular colour, May in a particular colour and June in a particular colour?

sshiny_0-1659950331122.png

 

1 ACCEPTED SOLUTION
sshiny
Helper II
Helper II

@Dinesh The above measure dint work, however the below measure worked for me-

Color =
var Month_Name = SELECTEDVALUE('Tag Usage Fact'[Month Name])
return
SWITCH(true(), Month_Name = "April", "Green",
Month_Name = "May", "Red",
Month_Name = "Proc Total", "Red",
Month_Name = "Average", "Red",
Month_Name = "June", "Purple")

View solution in original post

2 REPLIES 2
sshiny
Helper II
Helper II

@Dinesh The above measure dint work, however the below measure worked for me-

Color =
var Month_Name = SELECTEDVALUE('Tag Usage Fact'[Month Name])
return
SWITCH(true(), Month_Name = "April", "Green",
Month_Name = "May", "Red",
Month_Name = "Proc Total", "Red",
Month_Name = "Average", "Red",
Month_Name = "June", "Purple")
Dinesh_Suranga
Continued Contributor
Continued Contributor

Hi @sshiny ,

Please create the following measure and add that to background colour in conditional formatting.

Colour  =
// Table name is the table which available month names column and column name is he column which available month names
VAR SelectedMonth= Selectedvalue(Tablename[Columnname])

RETURN
SWITCH(SelectedMonth),
"April" , "blue",
"May" , "green",
"July" , "black",
"white"
)
Thank you.

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.