Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Matt78
Helper I
Helper I

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
Super User
Super User

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.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
Matt78
Helper I
Helper I

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

 

-Matt

pratyashasamal
Super User
Super User

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.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.