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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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