Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi everyone!
I need to calculate the exact time the calls ended.
I have the following data: date, start time and seconds that the call lasted.
Example: 05/12/22 ; 14:30:00; 34 (sec).
The "Start Time" column is in HOUR format and the column containing seconds is in INTEGER format.
How could I calculate the final time? According to the previous example, it should return the following value: 14:30:34.
Thank you very much. All the best!
Solved! Go to Solution.
Ok lets rather do it in Power Query
Add a custom column to total the seconds
Here is the Code :
Time.Hour([Hour]) * 3600
+
Time.Minute([Hour]) * 60
+
[Second]
Then
Add another Custom Column to convert it to Time
and here is the code :
#time(0,0,0) + #duration(0,0,0,[Hour converted to seconds])
Finally Change the type of the column to Time
Third Option would be this DAX
Let me know
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
Hi @Anonymous
In Power Query, convert the HOUR column to all Seconds, Add the converted column to the column containing seconds and finaly convert the new column to Time format.
You can do it in DAX as well. The idea is always to render the HOUR column to all seconds...
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
Hi @aj1973 , thank you so much for your answer.
I already have the column with all seconds in a integer format. However, I don't know how to convert the column to Time format. I tried it with the function "Convert" but it returns me "dd:mm:yyyy" instead of "hh:nn:ss".
Could you help me? Thank you in advance.
Regards.
Hey @Anonymous
Firts add a column to covert the time to all seconds
Then add a new column to convert all seconds to Time
And here are the 2 DAX codes:
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
Thanks @aj1973 ! I could get the column with the Time. Nevertheless, the format is in Text and I need it in Time. When I try to change the format the result is: #ERROR in all rows. Why I can't convert it to a Time format?
Regards,
Bibi
Jara
Ok lets rather do it in Power Query
Add a custom column to total the seconds
Here is the Code :
Time.Hour([Hour]) * 3600
+
Time.Minute([Hour]) * 60
+
[Second]
Then
Add another Custom Column to convert it to Time
and here is the code :
#time(0,0,0) + #duration(0,0,0,[Hour converted to seconds])
Finally Change the type of the column to Time
Third Option would be this DAX
Let me know
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
Yes! @aj1973 I finally made it!
I solved it through Power Query. Really, thank you so much for your help. I can't be more grateful.
Kind regards,
Bibi
User | Count |
---|---|
123 | |
76 | |
62 | |
50 | |
50 |
User | Count |
---|---|
175 | |
125 | |
60 | |
60 | |
58 |