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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
RDF25087
Helper I
Helper I

If TODAY is between 2 dates

Hi all -

 

This seems pretty straight forward - but I can't find a straight forward answer.

 

I have a table of contracts with a start and end date. I simply need a measure that will state that if TODAY() is in between the start and end date it reurns "Live", else "Expired" - please see example table below:

 

Contract IDStart DateEnd DateRESULT
6023501/01/202331/12/2023Live
6023601/01/202315/10/2023Live
6023701/01/202330/06/2023Expired
6023801/01/202231/12/2022Expired

 

Help!

 

Thanks

RDF

1 ACCEPTED SOLUTION
nabandla
Helper I
Helper I

Status Measure = VAR CurrentRowStartDate = MAX('Table'[Start Date]) VAR CurrentRowEndDate = MAX('Table'[End Date]) RETURN IF ( AND(TODAY() >= CurrentRowStartDate, TODAY() <= CurrentRowEndDate), "Live", "Expired" )

View solution in original post

3 REPLIES 3
nabandla
Helper I
Helper I

Status Measure = VAR CurrentRowStartDate = MAX('Table'[Start Date]) VAR CurrentRowEndDate = MAX('Table'[End Date]) RETURN IF ( AND(TODAY() >= CurrentRowStartDate, TODAY() <= CurrentRowEndDate), "Live", "Expired" )

RDF25087
Helper I
Helper I

@snow84- thanks for the response. Apologies, I should have been clearer - I was after a measure.

snow84
Frequent Visitor

Do you want a measure or a calculated column? If you just want a column, this should work:

 

RESULT = IF(TODAY() > [Start Date] && TODAY() < [End Date], "Live", "Expired")

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.