Skip to main content
Microsoft Idea

Power BI

Needs Votes

allow conditional formatting for a text value in a matrix

Vote (22) Share
Paolo's profile image

Paolo on 30 Sep 2017 04:31:04

I would love to see conditional formatting based on a non numeric value in a matrix.

For example, I have a matrix showing customer on rows, Date on columns, a numeric value in "Values", and another text based value in the "Values" input. I would like to apply conditional formatting to the text based value (in this case Red/Yellow/Green)

I was able to apply a text value in the matrix Values input using the following calculated measure:

Curr Rating R/Y/G = SWITCH(TRUE () ,
AND( sum(ScorecardMonthlyValues[Red]) = 1, COUNT('Date'[MonthCaption]) = 1), "-R-",
AND( sum(ScorecardMonthlyValues[Green]) = 1, COUNT('Date'[MonthCaption]) = 1), "-G-",
AND( sum(ScorecardMonthlyValues[Yellow]) =1 , COUNT('Date'[MonthCaption]) = 1), "-Y-",
"--")