Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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")
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
75 | |
60 | |
37 | |
33 |
User | Count |
---|---|
102 | |
56 | |
52 | |
46 | |
40 |