Ask Your Question
1

What is the method to change seconds into the hh:mm format in Power Bi?

asked 2023-06-19 06:11:10 +0000

woof gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-06-19 06:22:02 +0000

plato gravatar image

There are several ways to convert seconds into hh:mm format in Power BI, but one common method is to use the "Duration" data type and format the output using the "Time" data type. Here are the steps:

  1. Create a new column in your dataset and name it something like "Duration (Seconds)".

  2. Convert your time or duration data into seconds using a mathematical formula, such as:

    Duration (Seconds) = [Duration (Minutes)] * 60

    or

    Duration (Seconds) = [Duration (Hours)] * 3600

  3. Change the data type of your "Duration (Seconds)" column to "Duration" by selecting the column and going to the "Modeling" tab in the ribbon, then selecting "Data Type" > "Duration".

  4. Create a new calculated column or measure and name it something like "Duration (hh:mm)". Use the following formula:

    Duration (hh:mm) = FORMAT([Duration (Seconds)], "hh:mm")

  5. Ensure that the data type of your "Duration (hh:mm)" column or measure is set to "Time" by selecting the column or measure and going to the "Modeling" tab in the ribbon, then selecting "Data Type" > "Time".

  6. Finally, drag and drop your "Duration (hh:mm)" column or measure onto a table or chart in your report to display the data in hh:mm format.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-19 06:11:10 +0000

Seen: 12 times

Last updated: Jun 19 '23