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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
GMC117
Frequent Visitor

Conditional formating

Hello guys, i have a problem with conditional formating. I need to highlight qty column bassed on days remaining column. If the days remaining is <=90 and >0 then it should be highlighted red, if days remaining >90 and <=180 then yellow. When I made formating changes few lines are not highlited corretly(days remaining=59 but highlighted in yellow). Please help

Screenshot_10.pngScreenshot_11.png

1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi @GMC117

 

As is requested by you that you wanna make a conditional formatting about column QTY based on the column “Days Remaining”, but I found there’s an error in your operation: in the selection of “based on field”, you choose “sum of column 2”, I’m not sure what “column 2” refers to ?

111.jpg

If you wanna make a formatting based on “days remaining”, then here you should select column “days remaining”. As what I showed below:
Pls note that if there’s blank rows in your column and you hope that the related columns will also be marked as “red” ,you need to add a rule : if value is blank, then “red”.

 

555.png

Or you can also create a measure as : 

 

Measure = var a = SUM('Table'[Days Remaining])
return
IF(a<=90 && a>= 0, "Red", IF(a>90 && a<=180,"Yellow")
)

 

Then make the operation as below:

444.png

 

 

You will also get the same result.

 

The related .pbix file you can turn to :

https://wicren-my.sharepoint.com/:u:/g/personal/michael_wicren_onmicrosoft_com/ETJYouFdQjtKrzAuOCIzp...

 

For more details ,you can turn to  URL: https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting

 

Hope this would help.

 

Best Regards,

Kelly

View solution in original post

1 REPLY 1
v-kelly-msft
Community Support
Community Support

Hi @GMC117

 

As is requested by you that you wanna make a conditional formatting about column QTY based on the column “Days Remaining”, but I found there’s an error in your operation: in the selection of “based on field”, you choose “sum of column 2”, I’m not sure what “column 2” refers to ?

111.jpg

If you wanna make a formatting based on “days remaining”, then here you should select column “days remaining”. As what I showed below:
Pls note that if there’s blank rows in your column and you hope that the related columns will also be marked as “red” ,you need to add a rule : if value is blank, then “red”.

 

555.png

Or you can also create a measure as : 

 

Measure = var a = SUM('Table'[Days Remaining])
return
IF(a<=90 && a>= 0, "Red", IF(a>90 && a<=180,"Yellow")
)

 

Then make the operation as below:

444.png

 

 

You will also get the same result.

 

The related .pbix file you can turn to :

https://wicren-my.sharepoint.com/:u:/g/personal/michael_wicren_onmicrosoft_com/ETJYouFdQjtKrzAuOCIzp...

 

For more details ,you can turn to  URL: https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting

 

Hope this would help.

 

Best Regards,

Kelly

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.