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
tejennin
New Member

Accept or Reject Orders based on On Hand Quantity vs Order by Order & Total Ordered Quantity

I've been asked to build a report for my company that will improve our order processing by making an at-a-glance report as to which orders should be accepted or rejected based on Ordered Quantity and what we have in stock.

 

The most obvious solution is to simply build a conditional column which compares the ordered amount to our on-hand quantity, but this clearly presents a problem where we have a very low OH amount (lets say 4) and numerous low-quantity orders (say 7 or 8 orders of quantities of 2 or 3 items).

 

I'm still looking into the logic of how to essentially sum orders by itemCode, but I'm afraid I've got two bits of logic I'm struggling with - Even summing all orders by item code returns a reject for all orders if the total is over our OH quantity. I need to be able to look at these orders, by item code, line by line and accept all the orders that I can before rejecting those that go over our stock.

 

Additionally, in productivity's interest, I want to accept the highest quantity orders first before accepting smaller orders. Is this something that can be done in Power Query? Any assistance is much appreciated.

1 REPLY 1
v-yuezhe-msft
Employee
Employee

@tejennin,

Please share sample data of your table and post expected result here so that we can provide you appropriate Power Query code.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.