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.
Hello All,
Need help to get sum of Time(HH:MM) in Total, Here we converted minutes into HH:MM getting properly, in matric visual at "Total" we are getting only earliest value only but need to get total for that day.
For reference inserting image. Need to get Total in top.
Thanks in Advance
Solved! Go to Solution.
Hi @jay_patel ,
Wishout your pbix file ,and you can see the below sample:
basic data:
And then use the follow measure:
Measure = FORMAT(SUM('Table'[one])+SUM('Table'[two])+SUM('Table'[three]),"hh:nn")
And final I get:
I have done the calculations manually and they are accurate.
Wish it is helpful for you!
Best Regards
Lucien
@jay_patel Hey
You can use below
Total hours_new =
SUMX (
FILTER ( ALL ( 'test_hhnn' ), [Date] = SELECTEDVALUE ( test_hhnn[Date] ) ),
HOUR ( [D1] ) + HOUR ( [D2] )
+ ( MINUTE ( [D1] ) + MINUTE ( [D2] ) ) / 60
)
Kudos will be appriciated
Hi @jay_patel ,
Wishout your pbix file ,and you can see the below sample:
basic data:
And then use the follow measure:
Measure = FORMAT(SUM('Table'[one])+SUM('Table'[two])+SUM('Table'[three]),"hh:nn")
And final I get:
I have done the calculations manually and they are accurate.
Wish it is helpful for you!
Best Regards
Lucien
One way to do that easily is to store your times/durations as decimal numbers instead so you can easily do math on the (SUM, etc.). You can then wrap your result with FORMAT() to display it the way you want. In the example below, a decimal column with Durations is SUMmed and then displayed as hours/minutes. Note that the decimal number is in the units of days.
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |