Forum Discussion

Asil098's avatar
Asil098
New Member
1 year ago
Solved

calculating time

Hi Everyone, I am trying to calculate the time difference between the end_date and the start_date, and I want the result in minutes. In some observations, start_date> end_date, and I have used the i...
  • v-tejrama's avatar
    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