Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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.
User | Count |
---|---|
14 | |
9 | |
8 | |
7 | |
5 |
User | Count |
---|---|
24 | |
16 | |
15 | |
10 | |
7 |