Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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 ID | Start Date | End Date | RESULT |
| 60235 | 01/01/2023 | 31/12/2023 | Live |
| 60236 | 01/01/2023 | 15/10/2023 | Live |
| 60237 | 01/01/2023 | 30/06/2023 | Expired |
| 60238 | 01/01/2022 | 31/12/2022 | Expired |
Help!
Thanks
RDF
Solved! Go to Solution.
Status Measure = VAR CurrentRowStartDate = MAX('Table'[Start Date]) VAR CurrentRowEndDate = MAX('Table'[End Date]) RETURN IF ( AND(TODAY() >= CurrentRowStartDate, TODAY() <= CurrentRowEndDate), "Live", "Expired" )
Status Measure = VAR CurrentRowStartDate = MAX('Table'[Start Date]) VAR CurrentRowEndDate = MAX('Table'[End Date]) RETURN IF ( AND(TODAY() >= CurrentRowStartDate, TODAY() <= CurrentRowEndDate), "Live", "Expired" )
@snow84- thanks for the response. Apologies, I should have been clearer - I was after a measure.
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")
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |