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 ,
I have no clue how to Sum each column based on Group, Total Work Hours in MN is where i calculated on Excel Column ,
For Hualage Trucks : Work Hours in MN + Stop Hours in MN
For Key Account trucks : Idling Hours in MN + Work Hours in MN
How to acheive this on Power BI ?
Groups (groups) | Idling Hours in MN | Work Hours in MN | Stop Hours in MN | Total Work Hours In MN |
Haulage Trucks | 30 | 772 | 116 | 888 |
Haulage Trucks | 32 | 1149 | 182 | 1331 |
Key Account Trucks | 53 | 189 | 715 | 242 |
Key Account Trucks | 136 | 406 | 1008 | 542 |
Solved! Go to Solution.
You could do this by using SUMX to generate a row context, then testing for the value of the Group using an IF or SWITCH statement.
So something like the following should work:
SUMX( table1 ,
SWITCH( table1[Groups (groups)]
, "Haulage Trucks", table1[Work Hours in MN] + table1[Stop Hours in MN]
, "Key Accounts Trucks", table1[Idling Hours in MN] + table1[Work Hours in MN]
)
)
You could do this by using SUMX to generate a row context, then testing for the value of the Group using an IF or SWITCH statement.
So something like the following should work:
SUMX( table1 ,
SWITCH( table1[Groups (groups)]
, "Haulage Trucks", table1[Work Hours in MN] + table1[Stop Hours in MN]
, "Key Accounts Trucks", table1[Idling Hours in MN] + table1[Work Hours in MN]
)
)
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 |
---|---|
118 | |
75 | |
46 | |
44 | |
34 |
User | Count |
---|---|
179 | |
89 | |
69 | |
47 | |
47 |