Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi folks,
Looking at a dataset where I'm trying to work out the duration of months open from the start date.
Example:
Start date | End date | Months Open |
05 December 2023 | 10 December 2023 | |
06 May 2022 | 01 April 2023 | |
07 November 2022 |
I was previously using
Solved! Go to Solution.
Hi,
try something like this:
Months Open = IF( ISBLANK('inYear'[End date]), DATEDIFF('inYear'[Start date], TODAY(), MONTH), DATEDIFF('inYear'[Start date], 'inYear'[End date], MONTH) )
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Hi,
try something like this:
Months Open = IF( ISBLANK('inYear'[End date]), DATEDIFF('inYear'[Start date], TODAY(), MONTH), DATEDIFF('inYear'[Start date], 'inYear'[End date], MONTH) )
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Thank you, that has worked wonderful!
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
27 |
User | Count |
---|---|
92 | |
50 | |
44 | |
40 | |
35 |