# Weekly Challenge

Solve the challenge, share your solution and summit the ranks of our Community!
New content is available in Academy! You may need to clear your browser cache for an optimal viewing experience

## Challenge #65: Fulfilling Inventory Orders

Highlighted
Asteroid

Lots of IF logic needed for this one!

Spoiler
Highlighted
Asteroid

My Solution

Highlighted
Alteryx Partner

A useful exercise I have run into in Excel-land for mortgage calculations.

I'll confess I had to do this in Excel first to get my thoughts straight....

Spoiler
There also was a wrinkle that my "Initial Supply" calculation couldn't refer to the prior row's "Remaining Supply" as I would do in Excel.  That took a bit of time to sort.

Process:

- Join the two tables based on SKU

- Initialise Initial Supply and Remaining Supply (not sure if that was needed, but it helped me to think)

- Calculate the Initial Supply for each attempted order based on prior orders filled

- Calculate Remaining Supply after each attempted (or filled) order

- Calculate the number of units provided in each order that was filled

- Filter results to get rid of those orders not filled

Asteroid
Spoiler
Spoiler

Highlighted
Asteroid

PFA my solution

Highlighted
Meteor

Highlighted
Asteroid

Heres my solution - thanks

Highlighted
Asteroid

Sorta the same as the solution...

Highlighted
Alteryx Certified Partner
Spoiler
Highlighted
Asteroid

Hi All,