Forum Discussion

Ratso's avatar
Ratso
Frequent Visitor
2 years ago
Solved

Calculating time between 2 different columns

Hello,

I am sure this question has been asked million of times but I can't seem to find the solution and to be honest it is driving me insane.

I have two columns with time stamps in a Appended Data Query

INVOICE CREATEDNext Start Time
08:58:2508:58:40
08:58:4008:58:56

 

'Next Start Time' is a calculated column getting the next INVOICE CREATED time from the next row if the name of the person producing is the same.

Now this is where I am getting stuck I need another, calculated column showing the difference between the two times in hh:nn:ss

 

I have seen the posts where I can show the time in HOUR, MINUTES or SECONDS

PROCESSING TIME = DATEDIFF('Appended Data'[INVOICE CREATED],'Appended Data'[Next Start Time],MINUTE)
 

But, it isn't what I need to show in the table visual, but (using the above table as an example )

INVOICE CREATEDNext Start TimePROCESSING TIME
08:58:2508:58:4000:00:15
08:58:4008:58:5600:00:16

 

Any help would be greatly appreciated.

  • Have you tried taking a simple difference and setting the column type to Time?

    'Appended Data'[Next Start Time] - Appended Data'[INVOICE CREATED]

    Note: If processing time can be longer than 24 hours, this might not be a good approach.

4 Replies

  • Have you tried taking a simple difference and setting the column type to Time?

    'Appended Data'[Next Start Time] - Appended Data'[INVOICE CREATED]

    Note: If processing time can be longer than 24 hours, this might not be a good approach.

    • Ratso's avatar
      Ratso
      Frequent Visitor

      OMG!!😯

      Thats done it... I have a tendency to over think things😶

       

      Just out of interest... is there a better approach than doing it this way as I will have thousands of lines to add to this append. Should I be doing it in power query instead as a calculated column on the report

  • Ratso's avatar
    Ratso
    Frequent Visitor

    Many thanks, will give it a go ğŸ˜ƒ