Alteryx Designer Desktop Discussions

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

Help with Forecast Formula

amevy
6 - Meteoroid

I would like to create  a formula that determines a forecast based on another column called Actuals.   The formula should works as follows if the Actual amount is not equal to 0 then copy the Actual into the Forecast.  If the Actual is 0 then copy the most recent (previous) record from Actuals into the Forecast.  In the example below the month is Sept so there are Actuals.  For every future row in the table Oct -> Dec copy the last value of Actuals  into the Forecast.  The challenge is this must be done within the same product. Any help much appreciated.

 

MonthProductActualsForecast
JunProduct A99
JulProduct A1010
AugProduct A1111
SepProduct A1212
OctProduct A012
NovProduct A012
DecProduct A012
JunProduct B2020
JulProduct B2121
AugProduct B2219
SepProduct B1919
OctProduct B019
NovProduct B019
DecProduct B019

  

3 REPLIES 3
FrederikE
13 - Pulsar

Hey @amevy,

 

You could configure a multirow Tool like this: 

FrederikE_0-1683914540268.png

 

IF Actuals=0
THEN


IF [Row-1:Actuals]=0
THEN [Row-1:Forecast]
ELSE [Row-1:Actuals]
ENDIF


ELSE [Actuals]
ENDIF

 

amevy
6 - Meteoroid

Thanks for quick response testing now.

amevy
6 - Meteoroid

@FrederikE  - Thanks worked great !...is there anything Alteryx cant do !😊

Labels