1 of 1 people found this helpful
Try this calculated field: MAKETIME(INT([Mins]/60),[Mins]%60,0)
You can format the field to hh:mm
2 of 3 people found this helpful
1) Create a calculated field called HH:MM
Formula: [Field Value in Minutes]/60
2) Right click on the newly created calculated field --> default Properties -->Number Format --> hh:mm
You will get the required O/P
Hope this helps kindly mark this answer as correct or helpful so that it will help others
This did not work for me. I must be doing something wrong. I am trying a simple calculation for 47,044 minutes. Duration is a Measure. I created a calculated field call Hours. When I use (Duration/60), the result is 784.07. When I change the calculated field to hh:mm, I get 01:36. I am not sure what I did wrong. Thanks, Mark
What result are you expecting?
Thank you for the reply. I want the result in hh:mm = 784:04
I got the same issue,
I have a columm with a integer minutes numbers ex: 12120 and i need to convert this number to hhh:mm 202:00 but i get 010:00 value
Also, once the conversion is made, will the normal column total work? So, if the result is 784:04 for several different people, let's say 5 people, will the column total be 3920:20? Thanks for your assistance!
Hi Mark (and Leonardo),
Both you and Leonardo will probably need to follow this tutorial on adding time. Time is tricky. Especially when adding time that's greater than a 24 hour period. If the total is within 24 hours you're good with standard calc's & sum's.
This blog post by Jonathan Drummey will likely do it: Formatting Time Durations in Tableau | Drawing with Numbers Please make sure you read all the way through as there's an order of operations in order for it to work properly. You need to aggregate your time first. It could be as simple as SUM([DATEDIFF,'minute',[1st Time],[2nd Time]) You may have to modify his calc to adjust for minutes instead of seconds. Pay attention to formatting (have to use a custom number format).
Try this calc - it should sum for the case you mentioned. It converts the hours to an INT (so loses the ".07") and then pulls in the remainder separately - i.e. the minutes. It is converted to string to give you the appearance you want. No need to format this as HH:MM, that is taken care of in the calculation.
IF SUM([Mins])%60<10 THEN "0" END
Hey Mark i got a solution
In my case i have a value in minutes, if you have in second you need to change the calculated field
This is my tableau output and i got exactly what you wanted
First i created a sum of my minute field
Then i create the hhh:mm calculated field
After that it is just change hhh:mm format
If you are using second value change to minutes or add another line on hhh:mm calculated field like this one