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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.