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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
hawkeye159
Frequent Visitor

Conditional formatting using two date columns

Hi all, I'm new here and quite new to Power BI, trying to learn as I go and using forums like this to pick up tips.

 

But I'm struggling to find a solution that matches my problem.

 

I have a table with two different target dates - a normal target date (Target Date) and an extended target date (EOT Date).  The EOT date won't always be populated but the Target Date will.  I'm wanting to add conditional formatting so that, if the target date has expired, it will show red, BUT, if the EOT date has not expired, it will still show green.

 

I've tried adding a measure to show the Target Date as red where the date has passed and green if not:

 

Measure - Over Target Date = IF(SELECTEDVALUE(DCAPPL[TARGET DATE])>TODAY(),1,0)
 
Then added conditional formatting:
 
hawkeye159_0-1718797828549.png

 

That seemed to work:

hawkeye159_1-1718798081922.png

(Note: I added the same conditional formatting to the Application No. data too).

 

But am I able to highlight the columns if the EOT date was still in time?  So in the below screenshot, the application highlighted has a target date that has expired but the EOT date is still within time.  I would like this row to be showing as Green as it is still within time.  Likewise, the two applications below the highlighted one would show Red as their EOT date has expired.

 

hawkeye159_2-1718798353852.png

 

My apologies if this post is too lengthy or not concise enough.  I hope it makes sense and someone out there is able to understand me and help!

 

Many thanks in advance!

1 ACCEPTED SOLUTION
aduguid
Memorable Member
Memorable Member

Create a new calculated column or measure

 

Status = 
IF(
    ISBLANK('Table'[EOT Date]),
    IF('Table'[Target Date] < TODAY(), "Expired", "Not Expired"),
    IF('Table'[EOT Date] < TODAY(), "Expired", "Not Expired")
)

 

 

Set the rules for the conditional formatting:

  • If Status is "Expired", set the color to red.
  • If Status is "Not Expired", set the color to green.

View solution in original post

2 REPLIES 2
aduguid
Memorable Member
Memorable Member

Create a new calculated column or measure

 

Status = 
IF(
    ISBLANK('Table'[EOT Date]),
    IF('Table'[Target Date] < TODAY(), "Expired", "Not Expired"),
    IF('Table'[EOT Date] < TODAY(), "Expired", "Not Expired")
)

 

 

Set the rules for the conditional formatting:

  • If Status is "Expired", set the color to red.
  • If Status is "Not Expired", set the color to green.

Thank you so much, that works for me!

Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

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.