Forum Discussion
Data Modeling-Measure between Start and End Date
Could help me to add new measure calculating the difference between Start and End Date in years and months.
11 Replies
- amitchandakSuper User
GhadaMehrez , there are few ways.
refer attached files after signature can help?
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.- GhadaMehrezHelper III
Actually this so confusing to me especially since I'm new to using Power BI but I found this measure and it works well to calculate no. month between Start and End Date:
No.of months= SUMX(Orders, DATEDIFF(Orders[End Date],Orders[Start Date],month))
but the problem here is I want to calculate the number of month between the End Date and Today (Month remains to today) any help please to add a measure for that
- AnonymousNot applicable
Hi GhadaMehrez ,
Please update the formula of the measure [] as below and check if it can get your expected result...
No.of months = SUMX ( Orders, DATEDIFF ( Orders[End Date], TODAY (), MONTH ) ) If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards