Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
Trying to sum total time of in hours and minutes and seconds. I have converted the time to decimal format and tried the DAX code below though it is not giving me the correct number of days before I then divide to only show hours,mins & secs.
Can anyone assist me with where i am going wrong?
Thanks
KJH
Solved! Go to Solution.
Hi, @KJH
I think it's possible to create a Table based on the Total Hours in your image.
Then create a Calculate Column to represent the value of Show in hours and minutes.
Total Sum of Hours =
FORMAT(INT(20102.25),"00") & "h," & FORMAT(MOD(20102.25,1)* 60, "00") & "m"
Finally, convert it to Card form.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @KJH
I think it's possible to create a Table based on the Total Hours in your image.
Then create a Calculate Column to represent the value of Show in hours and minutes.
Total Sum of Hours =
FORMAT(INT(20102.25),"00") & "h," & FORMAT(MOD(20102.25,1)* 60, "00") & "m"
Finally, convert it to Card form.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, sorry, i could not get the above to work. I am looking to have the card showing the total time in hours and minutes.
This is not allowing me to upload a sample xlxs or power BI file.
KJH
maybe you can try something like below
Column =
VAR d=int('Table'[hour]/24)
VAR h=int('Table'[hour]-d*24)
VAR m=int(('Table'[hour]-int('Table'[hour]))*60)
VAR s=('Table'[hour]-int('Table'[hour]))*60-int(('Table'[hour]-int('Table'[hour]))*60)
return d&"d"&","&h&"h"&","&m&","&s&"s"
if it's still not working, pls provide the sample data and expected output.
Proud to be a Super User!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
78 | |
78 | |
59 | |
35 | |
33 |
User | Count |
---|---|
100 | |
62 | |
56 | |
47 | |
41 |