The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi all,
I would like to calculate the number of months in a list. For each element, I have a start date and an end date. I would like to count the number of months between the two dates, regardless of the day and including the starting and ending months. For example:
any idea how to do that?
Solved! Go to Solution.
Hi @AFra
Datedif function
When calculating intervals between months, Dax does not account for whether exactly 30/31 days pass between months.
Thus, its standard form will give you the difference you asked for.
As you added an extra month in your example, just add 1 at the end.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @AFra
Datedif function
When calculating intervals between months, Dax does not account for whether exactly 30/31 days pass between months.
Thus, its standard form will give you the difference you asked for.
As you added an extra month in your example, just add 1 at the end.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.