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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
dineshj23
Helper I
Helper I

Matrix visual cell element conditional coloring

Hi,

I have a matrix visual that shows the $ amounts and status of Sales by PO Number. In PowerBI, I only have the amount column and not the status column. I want to color code the $ amounts in the visual based on the status column. If the Sales 1 Status is approved, then the color should be green. If not, then it should be red color. I tried this with the conditional formatting but as you can see sometimes, there is more than one value per PO. 

I have already created a measure that exculdes the Voided status amounts. The amounts $ in the visual are from this measure. Below is the measure I have. 

"Sales 1 Total = calculate(sumx(Filter('Document',[Sales1Status] = "Approved" || [Sales1Status] = "TBD"),('[Sales 1 Amount])),USERELATIONSHIP('Calendar'[Date],[Sales 1 Date]))"
 

dineshj23_0-1678713656678.png

Thank you all. 

3 REPLIES 3
dineshj23
Helper I
Helper I

@amitchandak Thank you for your response. 🙂

I didn't understand what you meant above. 

 

I was able to figure out and did use the conditional formatting to color code the cells according to whether they have been approved or not.

 

Now, I am having issue with the dates that are blank. If the PO is approved but there is no milestone date, I want it to color the font red. I am using the below conditional formatting but I am not sure "Count of Date" means. I just want it to color the font red if the the milestone date is blank. 

 

dineshj23_1-1678742006024.png

Thank you again!

 

 

amitchandak
Super User
Super User

@dineshj23 , You can use that measure to return the color.  You can use that in the field value option

 

examples

 

Colour =
SWITCH(TRUE(),
'Table'[Date] < TODAY(), "red",
'Table'[Date] = TODAY(), "orange",
"green")

 

Colour =
SWITCH(TRUE(),
max('Table'[Month Year]) = "Jan-2020", "red",
Max('Table'[Month Year]) < "Feb-2020", "orange",
//keep on adding
"green")

 

 

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pan...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak I tried your way to create a measure then use the field value. However, I got the below error of not being able to find a single value for a column.

dineshj23_0-1678887889862.png

 

As you can see, I have several PO numbers with different dates for each PO. I can't use min or max since they are all independent of each other. 

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.