Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I am working to count number of months as below.
StartDate EndDate TotalMonths
26-dec-2023 25-dec-2024 13
30-nov-2023 30-nov-2024 13
01-jan-2024 31-dec-2024 12
Dax formula is
DATEDIFF(
StartDate,
EndDate,
MONTH
) +1
If I remove +1, it shows 11 months for current year data. Adding +1 in datediff works fine for current year but adds an extra month where startdate is in previous years.
How can I fix this issue.
Thanks in advance
Solved! Go to Solution.
Hi @kmax
Try this, you can use the below dax to create a new measure to solve the issue.
Did I answer your question?
Mark my post as a solution, this will help others...!
Hit the kudo also,
Thank you.
Hi @kmax
Try this, you can use the below dax to create a new measure to solve the issue.
Did I answer your question?
Mark my post as a solution, this will help others...!
Hit the kudo also,
Thank you.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
123 | |
78 | |
48 | |
38 | |
37 |
User | Count |
---|---|
196 | |
80 | |
70 | |
51 | |
42 |