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:
Create a new column in your dataset and name it something like "Duration (Seconds)".
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
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".
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")
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".
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.
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
Asked: 2023-06-19 06:11:10 +0000
Seen: 12 times
Last updated: Jun 19 '23