Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
How can I divide sum(total wages)/time(''hh:mm:ss") to get a rate? Is that possible?
Total wage is in decimal number format and time is in text format
Thanks!
Solved! Go to Solution.
You have to convert the time into a number @powerbiadmin123
I recommend you do this in Power Query as it is a very simple function - two functions actually.
Add a custom column, and use this formula:
Number.From(Time.FromText([Column1]))
It will convert it into a part of a day as shown below.
You can then use Number.Round() around it of you do not want all of those decimals used in your calculation.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingYou have to convert the time into a number @powerbiadmin123
I recommend you do this in Power Query as it is a very simple function - two functions actually.
Add a custom column, and use this formula:
Number.From(Time.FromText([Column1]))
It will convert it into a part of a day as shown below.
You can then use Number.Round() around it of you do not want all of those decimals used in your calculation.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingIf you are wanting to get an hourly rate, you would need to convert your time to hours then do the division that way. You should change the format of your time from text to time or date/time though. Then once you do that you can do Time.Hour(*yourTimeColumn*) + Time.Minute(*yourTimeColumn*)/60 + Time.Second(*yourTimeColumn*)/60/60 to get the total hours. Then take the total wages and divide by that.
That's how to do it in power query BTW.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |