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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Guys,
Kindly help with the measure to get the total remaining quantity by Inventory status per shipment from another table.
Below is my scenario
Greatly appreciate your inputs
Solved! Go to Solution.
@RFSOUW Yes you can
Remaining_Inventory =
CALCULATE(
SUM(Table2[Quantity]),
FILTER(
Table2,
Table2[Shipment_ID] = Table1[Shipment_ID] &&
Table2[Inventory_Status] <> "Sold" &&
Table2[Inventory_Status] <> "Reserved"
)
)
Proud to be a Super User! |
|
Thanks
Hi Bhanu,
Thanks. It works...if I can ask once more..if I have two statused I need to filter out (Sold & Reserved), can I simply add &&
Remaining_Inventory =
CALCULATE(
SUM(Table2[Quantity]),
FILTER(
Table2,
Table2[Shipment_ID] = Table1[Shipment_ID] &&
Table2[Inventory_Status] <> "Sold" && Table 2[Inventory_Status]<>"Reserved"
)
)
Thank you!
@RFSOUW Yes you can
Remaining_Inventory =
CALCULATE(
SUM(Table2[Quantity]),
FILTER(
Table2,
Table2[Shipment_ID] = Table1[Shipment_ID] &&
Table2[Inventory_Status] <> "Sold" &&
Table2[Inventory_Status] <> "Reserved"
)
)
Proud to be a Super User! |
|
First, ensure that you have a relationship between Table 1 and Table 2 on the Shipment_ID column.
Create a measure in Table 1 to calculate the remaining inventory
DAX
Remaining_Inventory =
CALCULATE(
SUM(Table2[Quantity]),
FILTER(
Table2,
Table2[Shipment_ID] = Table1[Shipment_ID] &&
Table2[Inventory_Status] <> "Sold"
)
)
Add this measure to your Table 1 to see the remaining inventory for each shipment.
Proud to be a Super User! |
|
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
31 | |
18 | |
15 | |
7 | |
5 |