Show seconds as hh mm ss in Power BI

Show seconds as hh mm ss in power bi

Power BI is a business intelligence (BI) tool that helps you analyze data and create interactive dashboards and reports. DAX, or Data Analysis Expressions, is a programming language used in Power BI to create calculated columns, measures, and other custom calculations. DAX is a rich language that offers a wide range of functions and operators. It can perform complex calculations, such as time intelligence and forecasting. This article describes how to show seconds as hh mm ss in Power BI.

Let us assume that the measure is ‘time in seconds’. Use the below calculated measure to format this measure as Time.

time mmss =
VAR hh = TRUNC(([time in seconds])/3600)
VAR mm =TRUNC(MOD([time in seconds],3600)/60)
VAR ss = MOD([time in seconds],60)
return TIME(hh,mm,ss)

Select the new measure ‘time mm:ss’ and then on the top ribbon of the Power BI desktop, change the format of the measure to ‘h:mm:ss’ as shown in the image below.

show seconds as hh mm ss in power bi

You can now display this new measure in a card visual in h:mm:ss format. Please note that you cannot use this measure in other charts like bar or pie charts.
We have seen how to show seconds as hh mm ss in Power BI.

Pro tips:
1. If your measure is already a date, you can just format it in the required format using the Format option in the top ribbon of Power BI desktop.
2. Refer to this article to learn how to export all measures from Power BI desktop file using PowerShell.

See more

Kunal Rathi

With over 13 years of experience in data engineering and analytics, I've assisted countless clients in gaining valuable insights from their data. As a dedicated supporter of Data, Cloud and DevOps, I'm excited to connect with individuals who share my passion for this field. If my work resonates with you, we can talk and collaborate.

Shopping Cart
Scroll to Top