Alteryx Designer Desktop Discussions

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

Calculating the future month values using the historical month values.

kiotsuresh
8 - Asteroid

I have a Dataset as attached, I have Actuals till 202210 for all line items and forecast values till 202812 for sales alone. I need tp calculate the forecast numbers for all other line items which are all ,

Damage
Profit
Revenue
Discount
Giveaway

 

using the below formula : ex for 202211 - (Nov2022 value)*(1+(Nov 2021value -Oct 2021value)/(Oct 2021value)) , This calculation should be applied to predict the values till 2028.

 

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 Before2011Amazon 
ForecastProfit

202211

Year 2011Amazon 
ForecastProfit

202211

Year 2012Amazon 
ForecastProfit

202211

Year 2013Amazon 
ForecastProfit

202211

Year 2014Amazon 
ForecastProfit

202211

Year 2015Amazon 
ForecastProfit

202211

Year 2016Amazon 
ForecastProfit

202211

Year 2017Amazon 
ForecastProfit

202211

Year 2018Amazon 
ForecastProfit

202211

Year 2019Amazon 
ForecastProfit

202211

Year 2020Amazon 
ForecastProfit

202211

Year 2021Amazon 
ForecastProfit

202211

Year 2022Amazon 

 

@ShankerV @MatthewO 

8 REPLIES 8
AndrewSu
Alteryx
Alteryx

@kiotsuresh , could you help me understand the dataset a bit better?

 

What is the relationship between the "Period" and the "Period Group"?

 

Looking at your formula  (Nov2022 value)*(1+(Nov 2021value -Oct 2021value)/(Oct 2021value)) it's not clear to me what cell/value refers to these variables since it looks like the "Period Groups" are appended to every "Period". 

 

Asked in another way, when you refer to the "Oct 2021value" which cell is that referring to and why?  see screenshot below. 

 

AndrewSu_0-1671484106917.png

 

Having this clarity will help me assist you more effectively. 

Thanks. 

 

kiotsuresh
8 - Asteroid

@AndrewSu 

Thanks for the Response. Period is the Actual Month and period group is just a classification. 

I have Narrowed down the data for us to achieve this, the Logic for forecasting the future month value will be, 

Example logic for 202211(Nov 2022) is(1+ ((Previous year Nov Value (Nov 2021)-(Previous Year Previous month Oct Value(Oct 2021))/(Previous Year Previous month Oct Value(Oct 2021))))*(Current Year Previous month Oct 2022 Value) -----> In the formula Months (Oct,Nov) is taken from the period column and value is taken from the value column.

 

The Above example is given for calculating the values for Nov 2022, This logic should also work for any future months like (Dec 22,jan 23...) - I need to forecast values like this till 2028 and append those new data rows to the existing data.

 

Please let me know if you have more doubts, happy to clarify to achieve this.

 

ScenarioAccountsPeriodPeriod GroupClientValue
ActualSales202101Year 2011Amazon101
ActualSales202102Year 2011Amazon114
ActualSales202103Year 2011Amazon126
ActualSales202104Year 2011Amazon138
ActualSales202105Year 2011Amazon150
ActualSales202106Year 2011Amazon162
ActualSales202107Year 2011Amazon174
ActualSales202108Year 2011Amazon186
ActualSales202109Year 2011Amazon198
ActualSales202110Year 2011Amazon210
ActualSales202111Year 2011Amazon222
ActualSales202112Year 2011Amazon234
ActualSales202201Year 2011Amazon246
ActualSales202202Year 2011Amazon259
ActualSales202203Year 2011Amazon272
ActualSales202204Year 2011Amazon285
ActualSales202205Year 2011Amazon298
ActualSales202206Year 2011Amazon311
ActualSales202207Year 2011Amazon324
ActualSales202208Year 2011Amazon337
ActualSales202209Year 2011Amazon350
ActualSales202210Year 2011Amazon363

 

AndrewSu
Alteryx
Alteryx

@kiotsuresh , thanks for the clarification, does that mean for the "Year 2011" classification and forecast for 202211 is

 

(1+((222-210)/(210)))*363 = 383.74?

 

If so, why doesn't that value exist in the forecasted values in the dataset?  Note that i filtered the dataset to "Sales", "Forecast" and "Year 2011".  

 

AndrewSu_0-1671568037637.png

 

kiotsuresh
8 - Asteroid

Hi @AndrewSu , 

does that mean for the "Year 2011" classification and forecast for 202211 is

 

(1+((222-210)/(210)))*363 = 383.74? - YES , Correct.

 

If so, why doesn't that value exist in the forecasted values in the dataset?  Note that i filtered the dataset to "Sales", "Forecast" and "Year 2011". -Only For Sales the forecast data Will be available in the Database, For rest we need to Achieve the Forecasted Values through the formula logic. To make it what i did yesterday is prepared an offline file and prepared the data like Attached, where you will find Actuals,Forecast Values for Sales and Actuals for Revenue and Blank Value Columns for Forecast from 202211 period. we need to populate the Revenue forecast data Using the formula for all the months till 2028.

 

Please Let me know if you have any more questions. Happy to assist and clarify.

 

 




AndrewSu
Alteryx
Alteryx

@kiotsuresh , thanks for the clarification. 

 

Please see the attached workflow to see one way to get the forecasts.

 

Note that you can calculate these in bulk by making a Batch Macro to consider all "Accounts" (sales, damage, discount, etc) by using a control parameter(s).

 

Check out the resources below to learn more about Batch Macros. 

 

https://community.alteryx.com/t5/Interactive-Lessons/Creating-a-Batch-Macro/ta-p/657923

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Getting-Started-with-Batch-Macros/t...

 

If this helps resolve your issue, please mark this reply as the solution so that others in the community can benefit from our collaboration. 

 

Thanks!

kiotsuresh
8 - Asteroid

@AndrewSu  thank you so much

kiotsuresh
8 - Asteroid

@AndrewSu 

Hi Andrew,

How are you doing, Happy new year. 

 

I have one scenario below,

year groupMeasure Name201301201302 
2011Sales16 
2012Sales27 
2013Sales38 
2014Sales49 
2015Sales510 
2016Sales611 
2017Sales712 
2018Sales8994 
2019Sales1015 
2020Sales1116 
2021Sales1217 
2022Sales1217 
2023Sales1419 
2024Sales1520 
2025Sales1621 
2026Sales1722 
2027Sales191196 
2028Sales1823 
TotalAverage Sales24.0555555629.05555556This Line need to be achieved through alteryx
  Average of row 2 - row 19Average of row 2 - row 19 

 

Can you help me in achieving this? I have tried multiple logics using the total option( which has only sum) as well as summarize option - didn't worked out any

AndrewSu
Alteryx
Alteryx

@kiotsuresh , can you share the workflow with your attempts? 

 

This should be an easy job for the Summarize tool.

 

Labels