Alteryx Designer Desktop Discussions

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

Predicting Forecast numbers with Previous values?

kiotsuresh
8 - Asteroid

I have Data Like below, Data Till 202210 will be considered as actual and data from 202211 will be considered as future. We need to achieve The Future Data  using the given logic.

 

Glimpse of the logic is : Consider the month is 202211 = (1+Oct 2022)*((Nov 2021-Oct 2021)/(Oct 2021)) and for other months The months change accordingly, I need to Achieve this forecast till 2028( I have Actual Data Till 202210). How to achieve this through Alteryx?

 

 

ScenarioItemPeriodGroupNameAmt   
ActualChair202109Group 1Sales %4.6%   
ActualChair202110Group 1Sales %5.5%   
ActualChair202111Group 1Sales %6.0%   
ActualChair202112Group 1Sales %5.6%   
ActualChair202201Group 1Sales %6.5%   
ActualChair202202Group 1Sales %4.5%   
ActualChair202203Group 1Sales %6.2%   
ActualChair202204Group 1Sales %4.2%   
ActualChair202205Group 1Sales %5.2%   
ActualChair202206Group 1Sales %4.5%   
ActualChair202207Group 1Sales %5.5%   
ActualChair202208Group 1Sales %5.4%   
ActualChair202209Group 1Sales %6.2%   
ActualChair202210Group 1Sales %7.2%LOGIC:  
FutureChair202211Group 1Sales % Nov 2022 (For Future Month)(1+Oct 2022)*((Nov 2021-Oct 2021)/Oct 2021)10%
FutureChair202212Group 1Sales % Dec 2022 (For Future Month)(1+Nov 2022)*((Dec 2021-Nov 2021)/Nov 2021) 
FutureChair202301Group 1Sales % Jan 2023 (For Future Month)(1+Dec 2022)*((Jan 2021-Dec 2021)/Dec 2021) 
8 REPLIES 8
MatthewO
Alteryx
Alteryx

@kiotsuresh you can accomplish this using a Multi-Row Formula  tool. I have attached an example.

kiotsuresh
8 - Asteroid

The Data I'm Having is Huge. Row 13 here represents the total actual rows right? It will be a dynamic one. And I want this to automatically run and execute in future also.

MatthewO
Alteryx
Alteryx

@kiotsuresh the Multi-Row Formula is a dynamic tool. From the current row being evaluated, it will look back or forward the defined number of rows. The logic for looking back 12 and 13 rows is to capture the Amt value from 12 and 13 months ago from the preceding rows. The expression assumes two things 1) that there is a row for every month in the period and 2) that the data is sorted from the oldest date to the newest.

 

In the screenshot below, I added 11 new sample periods to demonstrate the behavior. When the expression is evaluated at Sample Period 11, the current Amt, and the Amt from 12 and 13 periods ago are all 0. A Null value is returned because the expression would be dividing by zero in period 11. However, preceding periods return a result.

 

image.png

 

PhilipL
Alteryx
Alteryx

Hi @kiotsuresh,

 

You may also want to explore solving this with the Time Series predictive tools, especially if you have a large amount of historic data available to use.

PhilipL_0-1670959114340.png

 

kiotsuresh
8 - Asteroid

Attaching the Exact Format of the sample data that I'm Trying to achieve this solution. This may give an clear Idea. I have Actual and forecast data available for Sales till 202812, but for other Line items It is available till 202210, so I need to achieve the logic for these line items  and put under the Forecast Scenario. 

Damage
Profit
Revenue
Discount
Giveaway

 

I'm Trying multiple scenarios using multi row formula and not working out.

 

This Calculation need to be executed for each and every period group. say for example if we are forecasting Profit for 202211 - the output of the logic should have 13 records by period group like below,

ScenarioAccountsPeriodPeriod GroupClientValue

Forecast

Profit

202211

Year Before2011Amazon100
ForecastProfit

202211

Year 2011Amazon101
ForecastProfit

202211

Year 2012Amazon102
ForecastProfit

202211

Year 2013Amazon103
ForecastProfit

202211

Year 2014Amazon104
ForecastProfit

202211

Year 2015Amazon105
ForecastProfit

202211

Year 2016Amazon106
ForecastProfit

202211

Year 2017Amazon107
ForecastProfit

202211

Year 2018Amazon108
ForecastProfit

202211

Year 2019Amazon109
ForecastProfit

202211

Year 2020Amazon110
ForecastProfit

202211

Year 2021Amazon111
ForecastProfit

202211

Year 2022Amazon112

 

kiotsuresh
8 - Asteroid

@MatthewO the values present in the table snippet are the sample ones i have pasted for reference.

MatthewO
Alteryx
Alteryx

@kiotsuresh I've looked through the new data set but I'm not completely understanding the objective. When forecasting, historic values are used to predict future values, but it's not clear which historic values need to be considered for each period. For example, in the Profit accounts, this seems to suggest different actual performance values in May 2019.

 

image.png

 

If the future periods that you want to populate do not exist in your data set, you can generate these using the Generate Rows tool, then populate their value with the Multi-Row Formula. 

kiotsuresh
8 - Asteroid

Hi @MatthewO 

The main date which we need to consider in the data set is the period column. we need to achieve the forecasting using the historic period with the formula. Period group is just a sub category under each period.

Labels