Tutorial with example
In today’s video, I will show you how to calculate the difference between two dates using DATEDIFF.
I also show you how to overcome the issue when the start date is larger than the end date.
Download example file:
Link to demo file here.
In today’s video we will deconstruct a measure that was created by a microsoft employee in the Power BI community:
Link to the Power BI community post: https://community.powerbi.com/t5/Desktop/Calculate-duration-based-on-dates-in-different-rows/td-p/58886
Do you know how to calculate the difference between dates when both are in the same column?
One example of when this is needed is when you are working with subscription based services. If you want to calculate how many dates go between users changing subscriptions, this DAX measure will help you.
When the custom date filter in Power BI doesn’t do what you need, how you create your own? What if you need to do it by week?
Download example files:
Download the pbix and excel file here.
An error is returned if start_date is larger than end_date.