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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
PBI5851
Helper V
Helper V

how to calculate forecast based on previous month value in future

Hello,

I have the below two tables and date table as follows. 

 

TM Table

TM NameTMID
SteveSt123
MikeMk234
MittMi223
JohnJo876
DaveDa345
BobBo123

 

GainTable

TMIDGainDateGainCount
St1238/1/20231
St1238/5/20231
St1238/7/20231
St1238/10/20231
St1238/15/20234
St1238/6/20235
St1238/8/20232
Mk2348/1/20234
Mk2348/5/20235
Mk2348/7/20235
Mk2348/10/20232
Mi2238/15/20234
Mi2238/6/20231
Mi2238/8/20231
Mi2238/1/20232
Mi2238/5/20234
Mi2238/7/20235
Jo8768/10/20235
Jo8768/15/20231
Jo8768/6/20234
Jo8768/8/20235
Jo8768/1/20232
Da3458/5/20234
Da3458/7/20234
Da3458/10/20231
Da3458/15/20231
Bo1238/6/20232

 

I also have a date table for each day for the next 5 years and a column indicating a holiday as it is needed for calculating the forecast. 

Assuming the business days for Aug is 20, sep is 19, oct 22 and nov is 16

 

Date Table looks like this. didnt add the entire rows as it become too big to paste here

DatetableHoliday
8/1/2023n
8/2/2023n
8/3/2023y
8/4/2023n
8/5/2023y
8/6/2023y
8/7/2023n
8/8/2023n
8/9/2023n
8/10/2023n
8/11/2023n
8/12/2023y
8/13/2023y
8/14/2023n
8/15/2023n
8/16/2023n
8/17/2023n
8/18/2023y
8/19/2023y
8/20/2023y
8/21/2023n
8/22/2023n
8/23/2023n
8/24/2023n
8/25/2023n
8/26/2023y
8/27/2023y
8/28/2023n
8/29/2023y
8/30/2023n
8/31/2023n
9/1/2023y
9/2/2023y
9/3/2023y
9/4/2023y
9/5/2023n
9/6/2023n
9/7/2023n
9/8/2023n
9/9/2023y
9/10/2023y
9/11/2023n
9/12/2023n
9/13/2023n
9/14/2023n
9/15/2023n
9/16/2023y
9/17/2023y
9/18/2023n
9/19/2023n
9/20/2023n
9/21/2023n
9/22/2023n
9/23/2023y
9/24/2023y
9/25/2023n
9/26/2023n
9/27/2023n
9/28/2023n
9/29/2023n
9/30/2023y
10/1/2023y
10/2/2023n
10/3/2023n
10/4/2023n
10/5/2023n
10/6/2023n
10/7/2023y
10/8/2023y
10/9/2023n
10/10/2023n
10/11/2023n
10/12/2023n
10/13/2023n
10/14/2023y
10/15/2023y
10/16/2023n
10/17/2023n
10/18/2023n
10/19/2023n
10/20/2023n
10/21/2023y
10/22/2023y
10/23/2023n
10/24/2023n
10/25/2023n
10/26/2023n
10/27/2023n
10/28/2023y
10/29/2023y
10/30/2023n
10/31/2023n
11/1/2023n
11/2/2023n
11/3/2023n
11/4/2023y
11/5/2023y
11/6/2023n
11/7/2023n
11/8/2023n
11/9/2023n
11/10/2023n
11/11/2023y
11/12/2023y
11/13/2023n
11/14/2023n
11/15/2023n
11/16/2023n
11/17/2023n
11/18/2023y
11/19/2023y
11/20/2023n
11/21/2023n
11/22/2023y
11/23/2023n
11/24/2023y
11/25/2023y
11/26/2023y
11/27/2023y
11/28/2023y
11/29/2023y
11/30/2023y
12/1/2023n
12/2/2023y
12/3/2023y
12/4/2023n
12/5/2023n
12/6/2023n
12/7/2023n
12/8/2023n
12/9/2023y
12/10/2023y
12/11/2023n
12/12/2023n
12/13/2023n
12/14/2023n
12/15/2023n
12/16/2023y
12/17/2023y
12/18/2023n
12/19/2023n
12/20/2023n
12/21/2023n
12/22/2023n
12/23/2023y
12/24/2023y
12/25/2023n
12/26/2023n
12/27/2023n
12/28/2023y
12/29/2023y
12/30/2023y
12/31/2023y

 

The end result expected is 

TMAugSepOctNov
Steve1541.553.9570.135
Mike164355.972.67
Mitt1744.557.8575.205
John1744.557.8575.205
Dave103444.257.46
Bob120.526.6534.645

 

 

Issues i am running into - when i join the date from date table to gain date, i am not able to view sep oct and nov. I always have to display the current +3 months. 

The Aug counts come from the Gain table and the next months calculation are.

 

Steve Sep =

  • If Aug value is less then 40, then sep value is 50% more than aug value + business days in sep resulting in (15*0.5)+15+19 = 41.5
  • If Aug value is not less than 40, then sep value is 30% more than aug value . (15*0.3)+15
  • cotinuing the oct values are dependant upon the sep value and so on. 

 

Any suggestions on how to accomplish this please. 

 

7 REPLIES 7
lbendlin
Super User
Super User

I also have a date table for each day for the next 5 years and a column indicating a holiday as it is needed for calculating the forecast. 

Please provide that table, or at least the part for the four months of your scenario.

 

I always have to display the current +3 months. 

To report on things that are not there you need to use disconnected tables and/or crossjoins.

@lbendlin added date table

@lbendlin sorry for the delay. I have updated the original post with the data values

I arrive at different August numbers. Please check.

 

lbendlin_0-1693432506086.png

 

@lbendlin my apologies as i was away. You are correct on aug numbers. I had my calculation wrong. please advise on how you can achieve the next 3 month numbers as forcast.

Still not clear on your computations. Anyway, here is a proposal.

 

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.