Forum Discussion
wilson_smyth
Post Patron
7 years agocalculate total quantity for each order
I am trying to calculate the total quantity of items on all lines of an order. So each line will show the quantity for the orderline, and the total order quantity. Model is simple, an order dime...
parry2k
Super User
7 years agowilson_smyth i looked at your pbix but not fully clear about your requirement, can you put what your expected result is based on pbix you shared and where you see the issue?
- wilson_smyth7 years ago
Post Patron
Apologies for the lack of clarity, I have updated the original post with a screenshot of the report & two points explaining the issue with it that i am stuck on.
Please let me know if there is enough information here as i can add whatever is required.Thanks
- Zubair_Muhammad7 years ago
Community Champion
This MEASURE works with your sample data.
Measure = CALCULATE ( SUM ( Table1[Quantity] ), ALL ( Table1[OrderLineID] ), VALUES ( Table1[OrderID] ) )- wilson_smyth7 years ago
Post Patron
thank you, this does work!
I need to understand it so that i learn from this.
Could I ask for an explaination how the dax engine interperts this measure?Thank you for your help!