cancel
Showing results for
Did you mean:
Frequent Visitor

## Remaining warehouse quantities after shipments

Hello

I have a problem getting warehouse quantities after sales shipments. I try to create a matrix where I have an item, current quantity, forthcoming shipment dates, how many will be shipped and how many will be left after the shipment..

I would need some advice how to get remaining qty correclty, it should  give the result as seen on the 2nd pic from Excel.

2912pcs is the current quantity in warehouse

How can I calculate what is the remaining qty after each shipment?

BR
Matt

1 ACCEPTED SOLUTION
Responsive Resident

Hi @Matt78 ,
First create 2 measure ,

Order Qty running total in Date =
CALCULATE(
SUM('Table (4)'[Order Qty]),
FILTER(
ALLSELECTED('Table (4)'[Date]),
ISONORAFTER('Table (4)'[Date], MAX('Table (4)'[Date]), DESC)
)
)
Remaining Qty = CALCULATE( SUM('Table (4)'[Warehouse Qty]) - [Order Qty running total in Date] )
Now after adding this Remaining Qty you will able to see the desired result .

Thanks ,
Pratyasha

If this post helps, please Accept it as the solution to help other members find it.

2 REPLIES 2
Frequent Visitor

This is perfect. Huge thanks for the quick reply and solving this.

-Matt

Responsive Resident

Hi @Matt78 ,
First create 2 measure ,

Order Qty running total in Date =
CALCULATE(
SUM('Table (4)'[Order Qty]),
FILTER(
ALLSELECTED('Table (4)'[Date]),
ISONORAFTER('Table (4)'[Date], MAX('Table (4)'[Date]), DESC)
)
)
Remaining Qty = CALCULATE( SUM('Table (4)'[Warehouse Qty]) - [Order Qty running total in Date] )
Now after adding this Remaining Qty you will able to see the desired result .

Thanks ,
Pratyasha

If this post helps, please Accept it as the solution to help other members find it.

Announcements

#### 2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

#### Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

#### Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

#### Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.

Top Solution Authors
Top Kudoed Authors