Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I looked at this post which explaing about conversion from decimal to hh:ss. I tried to adapt it to my needs. My decimal number is day and according to google i need to multiply it by 86400 to get it into seconds in order to be able to use this code.
I can see that it is giving me conversion error but I have no idea which line of code this is. How would I determine where is the error from this.
Solved! Go to Solution.
Hi @stribor45 ,
You can try the following dax:
Column =
VAR time = 'Table'[Day]
VAR hours = ROUNDDOWN(24 * time , 0)
VAR H_rem = 24 * time - ROUNDDOWN(24 * time , 0)
VAR minutes = ROUNDDOWN(60 * H_rem , 0)
VAR M_rem = 60 * H_rem - ROUNDDOWN(60 * H_rem , 0)
VAR seconds = ROUND(60 * M_rem , 0)
Return
TIME(hours,minutes,seconds)
I show hh:mm:ss in Power Query, to Power BI Desktop it shows up fine and cannot reproduce your scenario:
Is your Power BI Desktop the latest version, if not, upgrade to the latest version in the link below:
Download Power BI Desktop from Official Microsoft Download Center
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @stribor45 ,
You can try the following dax:
Column =
VAR time = 'Table'[Day]
VAR hours = ROUNDDOWN(24 * time , 0)
VAR H_rem = 24 * time - ROUNDDOWN(24 * time , 0)
VAR minutes = ROUNDDOWN(60 * H_rem , 0)
VAR M_rem = 60 * H_rem - ROUNDDOWN(60 * H_rem , 0)
VAR seconds = ROUND(60 * M_rem , 0)
Return
TIME(hours,minutes,seconds)
I show hh:mm:ss in Power Query, to Power BI Desktop it shows up fine and cannot reproduce your scenario:
Is your Power BI Desktop the latest version, if not, upgrade to the latest version in the link below:
Download Power BI Desktop from Official Microsoft Download Center
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
in power query my data is shown as duration but once it is loaded into the model it is showing as a decimal number. Thats why I am trying to use this code above. Is there an easier way to show this decimal number as hh:mm:ss?
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.