Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
BassKroon
Frequent Visitor

Converting Whole Number to Minutes

Hello, 

 

Im working with a data set that has a whole number in it. 

I want to convert these whole numbers to a time so the number will be set to minutes. And ofcourse when im going to analyse it, the minutes will eventually count up to hours and days. 

 

Can someone help me out with this? 

 

Excuse me for my bad english, ill hope you will understand my question.

 

 

1 ACCEPTED SOLUTION
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @BassKroon,

Based on my test, you could refer to below steps:

1.I have entered some sample data(minutes) like the picture below:

1.PNG

2.Create a measure.

Measure = IF(SUM(Minutes[Minutes])/60<1,ROUND(SUM(Minutes[Minutes]),2)&"Minute",

          IF(SUM(Minutes[Minutes])/60>=1&&SUM(Minutes[Minutes])/1440<1,ROUND(SUM('Minutes'[Minutes])/60,2)&"Hours",

          IF(SUM(Minutes[Minutes])/1440>=1,ROUND(SUM(Minutes[Minutes])/1440,2)&"Day")))

3.Create a Card visual and a table visual, now you can see the result.

2.PNG

You can also download the PBIX file to have a view.

https://www.dropbox.com/s/auaeub6awzlun88/Converting%20Whole%20Number%20to%20Minutes.pbix?dl=0

 

Regards,

Daniel He

 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Looking for assistance.

Description of issue:

When deducting duration from Time, after an hour 00.00 and before 00.45, the value is not deducted correctly.

Walkthrough:


Working with columns:

"OpenHoursTo" as text value, eg. 

OpenHoursTo.JPG
"DeliveryTime" as whole number eg. 15, 45, 0

DeliveryTime.JPG

 

Purpouse -  find the timestamp: OpenHoursTo - DeliveryTime


Step_1: Transform text value of column "OpenHoursTo" to Time, we get eg: 16:00

 

Transformed_OpenHoursTo.JPG

Step_2: Transform whole number of column "DeliveryTime" to Duration

 

Transformed_DeliveryTime.JPG

So if DeliveryTime is 15, transformed value is - 0.00:15:00

Formula used: DeliveryTime = #duration(0,0,0, [DeliveryTime]*60) (NOT SURE IF THIS IS CORRECT)

Result:

 

Result.JPG

 

As can be seen highkighted values, except the last one give an incorrect result. Once the clock hits between 00.00 & 00.45, the values are not deducted correctly.

Any ideas how can I fix this issue?

Thanks, 
Ed

As this thread is already marked solved, you will get more responses if you create a new thread specifically for your issue

v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @BassKroon,

Based on my test, you could refer to below steps:

1.I have entered some sample data(minutes) like the picture below:

1.PNG

2.Create a measure.

Measure = IF(SUM(Minutes[Minutes])/60<1,ROUND(SUM(Minutes[Minutes]),2)&"Minute",

          IF(SUM(Minutes[Minutes])/60>=1&&SUM(Minutes[Minutes])/1440<1,ROUND(SUM('Minutes'[Minutes])/60,2)&"Hours",

          IF(SUM(Minutes[Minutes])/1440>=1,ROUND(SUM(Minutes[Minutes])/1440,2)&"Day")))

3.Create a Card visual and a table visual, now you can see the result.

2.PNG

You can also download the PBIX file to have a view.

https://www.dropbox.com/s/auaeub6awzlun88/Converting%20Whole%20Number%20to%20Minutes.pbix?dl=0

 

Regards,

Daniel He

 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thank you! It is helpful. I would like some help with your card visual 2, If the minutes are 70 then it should show 1.10 (but currently it is showing 1.17), Is it possible to get the data in this format?

This worked great for me but its not sorting as expected: mins > hours > days or vice versa. Any suggestions?

 

AmberJane_0-1654800554351.png

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.