Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Formula Help or Maybe an Iterative Macro?

Fischer
5 - Atom

Hello! 

 

I'm new to Alteryx and have come across a calculation issue that I just can't see to resolve.  Basically I am taking prior month inventory amounts as a starting point to project inventory levels for the following month.  Each new projected month uses the prior month as a starting point for the calculation.

 

I have been able to complete the following:

 

1.  Create a new column name "Sum Prior Month Current Inv" to show prior months "Sum Current Total Inventory Amt - As Of"

2.  Multiply the "Sum Prior Month Current Inv" by "Sum FCST Inv Adjustment" to create the "Sum Value"

3.  Take the "Sum Value" plus "Sum Prior Month Current Inv" to create "Predictive Current Inventory"

4.  Place the "Predictive Current Inventory" result into the "Sum current total inventory Amt  - As Of"

 

Now I'd like to repeat this same process till all the "Null" records for "Sum Current Total Inventory Amt - As Of" are populated; thereby; creating a monthly inventory profile into the future.

 

I think I might need a macro???  Thanks for any help.

 

Cheers, Caroline.

Inventory Calc.PNG

 

2 REPLIES 2
jdunkerley79
ACE Emeritus
ACE Emeritus

I would guess you could do it in a single multi-row formula tool. I think you could make the Predictive Current Value with the expression:

IF Not IsNull([Sum Current Total Inventory Amt - As Of]) THEN
	[Sum Current Total Inventory Amt - As Of]
ELSE
	[Row-1:Predictive Current Inv] * (1 + [Sum FCST Inv Adjustment])
ENDIF

  Having populated this column  you could then reverse out the other columns using Multi-Row formula tools

 

If you can post some data and expected answers happy to adjust formula to work correctly

 

Sample attached based on screenshot and above expression

Fischer
5 - Atom

Thank you this worked perfectly!  I really appreciated the quick response. 

Labels