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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Conditional formatting of PowerBi table

I am having trouble figuring this out. I have followed instructions found elsewhere on the forum but I can't seem to get it to work.

 

I have a table with multiple columns, one column contains due dates which are listed in the following format (YYYYMMDD) and I want the rows to be highlighted as follows:

 

- Red if due date is today or has already past

- Yellow if due date is within 30 days of today

- Green if due date is greater than 31 days from today

 

Your help is greatly appreciated! Thanks 

 

1 ACCEPTED SOLUTION

1. You can do this way

serpiva64_0-1646685177013.png

select each column and then apply conditional formatting with the same rule

serpiva64_1-1646685552218.png

 

 

2. you can use what color you want:

DateDueColor = if(DATEVALUE(left('Table'[DateDue],4)&"-"&MID('Table'[DateDue],5,2)&"-"& RIGHT('Table'[DateDue],2))<=TODAY(),"LIGHT BLUE",if(DATEVALUE(left('Table'[DateDue],4)&"-"&MID('Table'[DateDue],5,2)&"-"& RIGHT('Table'[DateDue],2))<=TODAY()+30,"YELLOW","#70BBFF"))
3. You can remove the column and it function

View solution in original post

3 REPLIES 3
serpiva64
Solution Sage
Solution Sage

Hi,

You can try this way:

serpiva64_1-1646675427160.png

creating a calculated column:

DateDueColor = if(DATEVALUE(left('Table'[DateDue],4)&"-"&MID('Table'[DateDue],5,2)&"-"& RIGHT('Table'[DateDue],2))<=TODAY(),"RED",if(DATEVALUE(left('Table'[DateDue],4)&"-"&MID('Table'[DateDue],5,2)&"-"& RIGHT('Table'[DateDue],2))<=TODAY()+30,"YELLOW","GREEN"))
 
and then in Conditional formatting:
serpiva64_2-1646675517882.png

If this post is useful to help you to solve your issue consider giving the post a thumbs up 

 and accepting it as a solution !

 

Anonymous
Not applicable

Hi there,

 

thanks for your response. It worked! However, three questions:

 

1. I would like the entire row to be conditionally formatted rather than the column - for instance, if line item one is overdue, I want that entire row in the table to be red)

 

2. The green color shown is too dark so how can I change the shade of green with a custom hex # instead of standard green for instance?

 

3. I don't want the DateDueColor column to be in my table. I now have a column with values of GREEN, YELLOW and RED.  How do I remove this from the table without eliminating the formatting?

1. You can do this way

serpiva64_0-1646685177013.png

select each column and then apply conditional formatting with the same rule

serpiva64_1-1646685552218.png

 

 

2. you can use what color you want:

DateDueColor = if(DATEVALUE(left('Table'[DateDue],4)&"-"&MID('Table'[DateDue],5,2)&"-"& RIGHT('Table'[DateDue],2))<=TODAY(),"LIGHT BLUE",if(DATEVALUE(left('Table'[DateDue],4)&"-"&MID('Table'[DateDue],5,2)&"-"& RIGHT('Table'[DateDue],2))<=TODAY()+30,"YELLOW","#70BBFF"))
3. You can remove the column and it function

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors