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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Table 1:
Order Number Material Description Quantity Calculated Column (Total Quantity)
11111111 Panel 3 17
11111111 Panel 3 17
11111111 Panel 3 17
11111111 Panel 3 17
11112222 Window 4 0
22222222 Spacer 3 3
I want to create a calculated column (Total Quantity) which calculates the number of Quantity based on the Order Number and only calculates the quantity when the material description is either Panel or Spacer. Returns 0 if not in this material description.
What is the DAX function for this . Thanks
Solved! Go to Solution.
@ephramz , Try a new column like
sumx(filter(Table, [Order Number] = earlier([Order Number]) && [Material Description] in {"Panel" , "Spacer"}),[Quantity] )
@ephramz , Try a new column like
sumx(filter(Table, [Order Number] = earlier([Order Number]) && [Material Description] in {"Panel" , "Spacer"}),[Quantity] )
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 35 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 134 | |
| 96 | |
| 78 | |
| 67 | |
| 65 |