If you want to convert hours values to minutes in Power BI, it is not as straightforward as multiplying it by 60.
This is because Power BI has a specific way of storing date and time values in Power BI.
In this Power BI Tutorial, We will discuss how to convert hours to minutes in Power BI with a simple example.
How to Convert Hours to Minutes in Power BI
This example shows how to change hours to minutes in Power BI.
Scenario:
Imagine you’re managing a small marketing team responsible for creating social media content. You want to analyze how much time each team member spends on content creation to allocate resources better and improve efficiency.
According to this scenario, we have an Excel file named MarketingTeamWorkingHours with columns Team Name, Total Time. Check the screenshot below.
Now follow the below steps to change hours to minutes in Power BI:
1. Open Power BI Desktop. Under the Home tab, expand the Get data option. The select Excel workbook.
2. Select the Excel file you want to load in Power BI. Then click on the Open button.
3. Then, in the Navigator window, select the table you want to import.
If you look at the Total Time column, it automatically selects both date and time. I only want the time, so I’ll click “Transform Data.”
4. Then the Power Query Editor Opens. Check the screenshot below.
5. Select the Total Time column -> click calendar, and the time symbol in the column header -> Select the Time.
6. Then you can see our Total Time column only present time.
7. Then click File tab -> Select Close & Apply.
8. After that our dataset load in Power BI Desktop. You can see data in Data pene.
9. Under the Modeling tab, click New column.
10. In the formula bar put the below expression. Then click the Commit button.
Total Minute = HOUR('WorkingHours'[Total Time])*60 + MINUTE('WorkingHours'[Total Time])
Where:
- Total Minute = It is a calculated column in Power BI that represents the total duration of time in minutes.
- HOUR(‘WorkingHours'[Total Time]) = This part calculates the number of hours in the ‘Total Time’ column of the ‘WorkingHours’ table and converts it to minutes.
- *60 = This part multiplies the number of hours by 60 to convert it from hours to minutes.
- MINUTE(‘WorkingHours'[Total Time]) = This part calculates the remaining minutes (after converting hours to minutes) in the ‘Total Time’ column of the ‘WorkingHours’ table.
11. When you go to the Table view, you can see our Total Minute column.
This way, you can convert hours to minutes in Power BI.
I hope you found this Power BI tutorial useful.
With a simple example, this tutorial covered how to convert hours to minutes in Power BI.
Additionally, you may like some more Power BI articles:
- How to Convert Date to Text in Power BI
- Convert Decimal to Text in Power BI
- Convert Text to Number in Power BI
- Power BI convert yyyymmdd to date
I am Bijay a Microsoft MVP (10 times – My MVP Profile) in SharePoint and have more than 17 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com