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
Anonymous
Not applicable

Conditionally format cells in column based on text value of another column

Hello,

I have the following table and i want to conditionally format the "Action date" column cells based on the text in "Category" column.

1. If text "Late", then add red circle icon next to value.

2. If text "On time", then add green circle icon next to value.

3. If text "No action", then add yellow circle icon next to value.

4. If text "Undefined", then add dash icon next to value.

Any help is much appreciated!

 

Document IDStart dateEnd dateAction dateStockReturnsDefectiveCategory
399801/05/202101/06/202201/07/20226917Late
405027/05/202227/06/202227/06/20222510On time
405007/08/202207/09/202207/08/20225615On time
405214/07/202211/08/2022 5615Undefined
406008/08/202208/09/2022 348No action
406012/08/202220/09/202222/09/20222210Late
413917/08/202227/09/202223/08/20227822On time
414520/08/202210/10/2022 3313No action
414922/08/202202/09/202222/09/20226318Late
415729/08/202209/10/202202/10/20223314On time
415818/09/202215/10/2022 3314Undefined
416007/09/202217/10/2022 2717No action
416016/09/202206/10/202219/09/20223722On time
416420/10/202223/11/202215/11/20229316On time
416623/11/202202/12/202223/12/20227520Late
418711/12/202215/01/2023 9818No action
418704/01/202304/03/202317/02/20236716On time
418717/02/202313/03/202301/03/202371434On time
418911/12/202215/01/2023 9818No action
1 ACCEPTED SOLUTION
jsaunders_zero9
Responsive Resident
Responsive Resident

I would create a conditional column in Power Query to assign a number to each "status" (conditional formatting likes numbers).

 

jsaunders_zero9_0-1661388136647.png

 

Then you can apply conditional formatting based on the number value

 

jsaunders_zero9_1-1661388185024.png

 

Giving this result.

 

jsaunders_zero9_2-1661388205836.png

 

 

 

 

 

View solution in original post

1 REPLY 1
jsaunders_zero9
Responsive Resident
Responsive Resident

I would create a conditional column in Power Query to assign a number to each "status" (conditional formatting likes numbers).

 

jsaunders_zero9_0-1661388136647.png

 

Then you can apply conditional formatting based on the number value

 

jsaunders_zero9_1-1661388185024.png

 

Giving this result.

 

jsaunders_zero9_2-1661388205836.png

 

 

 

 

 

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.