Forum Discussion
calculating time
- 1 year ago
Hi Asil098,
Thanks for sharing your query in detail.
I have tested and reproduced your scenario in Power BI, including cases where the start_date is greater than the end_date, and I’m happy to confirm that I got the expected output exactly as per your requirement.
I used a DAX calculated column to compute the time difference in minutes, and it successfully handles both normal and reverse date situations. The output displays positive, negative, or zero values depending on the date order, matching your requirement perfectly.For your convenience, I have also attached a sample .pbix file showing the complete setup with data, DAX logic, and a table visual, so you can easily review, test, or modify it as needed.
Please find the attached .pbix file for your reference.If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Best Regards,
Tejaswi.
Community Support
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523