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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
v-power
Frequent Visitor

Conditional Formatting not working in Matrix for certain values but works in table

Hello All,

 

I am facing a weird issue on conditional formatting.

 

I created a measure to convert my text values to numbers and called it KPINumber. Here is the defintion:

 

KPINumber =
Var KPI_Var1 = SELECTEDVALUE(Table1[KPI_ActualValue_Text])
return
switch(TRUE(), KPI_Var1 = "Compliant",1,
KPI_Var1 = "Non-Compliant", 3,
KPI_Var1 = "Needs Improvement",2)
 
I use this measure KPI number in a table to color my values and it works fine and colors all the 3 values - Compliant to Green, Non Compliant to Red and Needs Improvement to Yellow.
 
However if I use the same in a matrix (changed the rows to colums), it colors for "Non Compliant" and "Needs Improvement" but doesn't color Compliant to Green. 
 
Any thoughts?
 
 
2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @v-power ,

 

Based on my test using the Power Bi version : 2.67.5404.341 64-bit (March 2019). I cannot reproduce your issue here. What is your version? Could you please share your pbix to me if you don't have any Confidential Information.Please upload your files to One Drive and share the link here.

 

Capture.PNG

 

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Thanks. Unforunately, it does have confidential information. I could see that the reason is because in a table view, the values are not summarized. (I selected the option dont summarize). 

 

However in matrix, its selecting the first of kpi_value and there is no option to do "dont summarize".  If there is an option in matrix , saying dont summarize, then this problem will be resolved. 

 

 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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