Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi all,
I need help for the DAX measure to calculate all values in Total column for all the same vessels (Vessel column) with same voyage number (voyage column).
Example below, VES 1 202001 (start and return port : PORT A) has to add 209, 49 and 61 in total time column to show RT(roundtrip) hours as 319 which needs to be further converted to its days equivalent.
VESSEL | VOYAGE | Load | Load Arrival | Load Departure | Port (h) | Discharge | Disch Arrival | Disch Departure | Transit (h) | Total(h) | RT Hours | RT Days |
VES 1 | 202001 | PORT A | 1/2/2020 15:54 | 1/9/2020 18:19 | 171 | PORT B | 1/11/2020 8:36 | 1/12/2020 3:07 | 38 | 209 | ||
VES 1 | 202001 | PORT B | 1/11/2020 8:36 | 1/12/2020 3:07 | 19 | PORT C | 1/13/2020 9:33 | 1/14/2020 0:30 | 30 | 49 | ||
VES 1 | 202001 | PORT C | 1/13/2020 9:33 | 1/14/2020 0:30 | 15 | PORT A | 1/15/2020 22:18 | 1/19/2020 11:00 | 46 | 61 | 319 | 13 |
VES 3 | 202001 | PORT A | 2/18/2020 8:00 | 2/18/2020 20:00 | 12 | PORT F | 2/22/2020 10:35 | 2/22/2020 22:06 | 86 | 98 | ||
VES 2 | 202005 | PORT A | 2/19/2020 8:38 | 2/21/2020 10:30 | 50 | PORT D | 2/22/2020 20:00 | 2/24/2020 4:00 | 34 | 84 | ||
VES 3 | 202001 | PORT F | 2/22/2020 10:35 | 2/22/2020 22:06 | 12 | PORT G | 2/26/2020 6:00 | 2/27/2020 22:00 | 80 | 92 | ||
VES 2 | 202005 | PORT D | 2/22/2020 20:00 | 2/24/2020 4:00 | 32 | PORT E | 2/25/2020 7:46 | 2/26/2020 1:48 | 27 | 59 | ||
VES 2 | 202005 | PORT E | 2/25/2020 7:46 | 2/26/2020 1:48 | 18 | PORT A | 2/27/2020 12:00 | 2/29/2020 23:00 | 35 | 53 | 196 | 8 |
VES 3 | 202001 | PORT G | 2/26/2020 6:00 | 2/27/2020 22:00 | 40 | PORT A | 2/29/2020 23:36 | 3/2/2020 8:36 | 49 | 89 | 279 | 12 |
Thank you in advance for your help!
Regards,
Dina
Solved! Go to Solution.
Hi @dnsia ,
Let me know if this works.
Create Measures in Power BI.
Total Hrs = Sum('Table'[Total(h)])
To Days =
var DayNo =INT([Total Hrs]/24)
var HourNo=INT((Mod([Total Hrs],24)))
return
DayNo & " day " & FORMAT(HourNo,"#00")& " hours"
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Hi @dnsia ,
Let me know if this works.
Create Measures in Power BI.
Total Hrs = Sum('Table'[Total(h)])
To Days =
var DayNo =INT([Total Hrs]/24)
var HourNo=INT((Mod([Total Hrs],24)))
return
DayNo & " day " & FORMAT(HourNo,"#00")& " hours"
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
117 | |
84 | |
49 | |
38 | |
28 |
User | Count |
---|---|
188 | |
76 | |
73 | |
54 | |
42 |