cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Matt78
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?

 

Matt78_0-1670497034954.png

 

Matt78_1-1670497052317.png

 

Thank you in advance

BR
Matt

 

 

1 ACCEPTED SOLUTION
pratyashasamal
Responsive Resident
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 .
pratyashasamal_0-1670499049496.png

Thanks ,
Pratyasha

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

View solution in original post

2 REPLIES 2
Matt78
Frequent Visitor

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

 

-Matt

pratyashasamal
Responsive Resident
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 .
pratyashasamal_0-1670499049496.png

Thanks ,
Pratyasha

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

Helpful resources

Announcements
Carousel_PBI_Wave1

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.

Power BI Summit Carousel 2

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!

BizApps LATAM 2023

Business Application LATAM Summit 2023

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

Power Platform Bootcamp

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.