Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Palmtop
Helper I
Helper I

Forecasting: Extrapolating relative to other curves

Hello All,

 

I've got an interesting challenge today.  I have the monthly sales data after a marketing campaign below in a table.  Alongside, the predicted low/base/high cases from a scenario analysis (red/blue/green respectively) and a baseline (no campaign, in purple).

Palmtop_2-1667557888947.png

The historical sales data obviously stops on October 2022 (shaded area).  

 

What I'd like is to reproduce the illustrated example done in Excel.  I want to create a measure/calculated columns to forecast the historical sales curve (black line).  It would find the latest monthly historical sales, determine where it is situated relative to the low/base/high cases, and extrapolate using that ratio.  Issue is there are lots of campaigns/products, some would be between low and base case, others would be above high case, others below baseline...etc.  

 

In Excel, my process is roughly as follows:

Categorise each campaign under following 5 scenarios:

  1. Below baseline
  2. Between baseline/low case
  3. Between low/base case
  4. Between base/high case
  5. Above high case

 

Then determine where last monthly sales number is situated.  So in this case, it would be roughly 50% of the way between base/high case.  Then extrapolate using that ratio so that the curve always stays 50% of the way between the base/high case.  

The formula in this case would be: 

 

Palmtop_1-1667557742024.png

 

I've included a dummy table below.

DateSalesBaselineLow ScenarioBase ScenarioHigh Scenario
01/02/20226581693576051266
01/03/202210791683535941218
01/04/20229361673495821173
01/05/20227251663455721132
01/06/20227721653415611093
01/07/20227161643375511056
01/08/20227611633335411022
01/09/2022767163330532990
01/10/2022745162326523960
01/11/2022 161323514931
01/12/2022 160320506904
01/01/2023 159316497878
01/02/2023 159313489854
01/03/2023 158310482831
01/04/2023 157307474809
01/05/2023 156304467789
01/06/2023 155301460769
01/07/2023 155298453750
01/08/2023 154295446732
01/09/2023 153292440715
01/10/2023 152289433699
01/11/2023 152286427683
01/12/2023 151284421668
01/01/2024 150281416654
01/02/2024 150279410640
01/03/2024 149276404627
01/04/2024 148274399614
01/05/2024 147271394602
01/06/2024 147269389590
01/07/2024 146266384579
01/08/2024 145264379568
01/09/2024 145262374557
01/10/2024 144259370547
01/11/2024 143257365537
01/12/2024 143255361528
01/01/2025 142253356519
01/02/2025 142251352510
01/03/2025 141249348501
01/04/2025 140247344493
01/05/2025 140245340485
01/06/2025 139243336477
01/07/2025 138241333470
01/08/2025 138239329462
01/09/2025 137237325455
01/10/2025 137235322448
01/11/2025 136233318442
01/12/2025 135231315435

 

Any help or tips is much appreciated, thank you!

2 REPLIES 2
Anonymous
Not applicable

Hi @Palmtop ,

 

Power BI Desktop has a built-in prediction curve feature that you can refer to.

Forecasting in Power BI. A visual step-by-step guide to… | by Ednalyn C. De Dios | Towards Data Scie...

 

BTW, if you are familiar with R or Python script. You can also create R/python visuals to coding formula invoke their forecast libraries to get the forecast values based on current table records.

Time Series Analysis using R – forecast package 

Forecast Table - R script - Microsoft Power BI Community

Protection des données comment se protéger (datamic.net)

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello Stephen,

 

Thanks for the links.  I've given the built-in forecast feature a spin but it's not exactly what I'm looking for.  

Looks like a python script might be the way to go for now if I can't get a DAX measure to work.  

 

Thanks again!

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors