Forum Discussion
Data Modeling-Measure between Start and End Date
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.
- GhadaMehrez4 years agoHelper 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
- Anonymous4 years agoNot 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
- GhadaMehrez4 years agoHelper III
Thanks a lot I created this measure but when I put the X Axis as No of Month measure the projects don't appear in the chart
Could you guide me how to attache PBIX