Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi Experts,
I have a table like below:
| Shipment Number | Material Number | Distance | Item Weight |
| S1 | M001 | 100 | 10 |
| S1 | M002 | 100 | 10 |
| S1 | M003 | 100 | 10 |
| S2 | M004 | 200 | 10 |
| S2 | M005 | 200 | 50 |
| S3 | M006 | 300 | 10 |
| S3 | M007 | 300 | 10 |
| S3 | M008 | 300 | 50 |
| S4 | M009 | 400 | 80 |
| S5 | M010 | 500 | 10 |
| S5 | M011 | 500 | 10 |
Each shipment can have multiple materials.
We need DAX to calculate the following measures:
If someone can help with the DAX, it would be very helpful.
Thanks
You can use
Total distance covered =
SUMX (
SUMMARIZE ( 'Table', 'Table'[Shipment number], 'Table'[Distance] ),
'Table'[Distance]
)
Total Weight = SUM( 'Table'[Item Weight])
Total Weight/KM = DIVIDE( [Total Weight], [Total distance covered])
Hi, The SUMX function does not accept a field as its 3rd argument. We need an aggregated value there. Can you help us?
There isn't a third argument to SUMX, I think you may have a typo in your code. Double check it against what I posted.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 8 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 20 | |
| 18 | |
| 16 | |
| 14 | |
| 14 |