Hello,
I’m trying to create a new sales table that shows full year sales figures by combining “Actual Sales” table and “Forecasting” table. So the new table will have mix of year-to-date actual sales and year-to-go forecast. This table will update automatically every week as actual sales gets updated. Both “Actual Sales” table and “Forecasting” table have numbers at weekly level. Moreover, what makes it even more difficult is that our company uses custom (fiscal) calendar and not normal calendar dates, which I learned how to work it by watching one of Sam’s videos on time series analysis.
To give an example of what I’m trying to do…
- “Actual Sales” table:
This table has columns as below. In this example, YTD actual sales happened from Jan WK1 to Feb WK3. In other words, I’m currently sitting on the middle of Feb WK4.
This table gets updated automatically every week with new weekly sales results as year goes by.
Year/Moth/Week of month; Customer; Product; Actual Sales Volume
2021/Jan/WK1; FL; a; 20;
2021/Jan/WK2; MN; b; 40;
2021/Jan/WK3; GA; c; 10;
2021/Jan/WK4; PA; a; 50;
2021/Feb/WK1; FL; f; 80;
2021/Feb/WK2; GA; b; 30;
2021/Feb/WK3; AZ; a; 10;
-
“Forecasting” table: this table has weekly forecast from 1st week of Jan to the 5th week of Dec. It has the same fields as the “Actual Sales” table.
-
New table that I’m trying to create: Combining the two tables with a condition/formula.
In this new table, I’m trying to grab actual sales from the “Actual Sales” table for the weeks that sales already happened. And then, for the remaining weeks for the year, it grabs forecast from the “Forecasting” table. The purpose for this table is to have a view that provides the full year estimated sales at weekly level by combining ‘Year To Date actual sales’ and ‘Year To Go forecast’.
As week passes, this table will automatically replace the forecast number of previous week with actual sales. So the new table should look like below…
Year/Moth/Week of month; Customer; Product; Volume; Actuals/Forecast
2021/Jan/WK1; FL; a; 20; Actuals
2021/Jan/WK2; MN; b; 40; Actuals
2021/Jan/WK3; GA; c; 10; Actuals
2021/Jan/WK4; PA; a; 50; Actuals
2021/Feb/WK1; FL; f; 80; Actuals
2021/Feb/WK2; GA; b; 30; Actuals
2021/Feb/WK3; AZ; a; 10; Actuals
2021/Feb/WK4; FL; a; 100; Forecast
2021/Mar/WK1; AZ; c; 200; Forecast
2021/Mar/WK2; AZ; f; 300; Forecast
.
.
.
2021/Dec/WK5; FL; a; 150; Forecast
Sorry for the long question but hope that you understand what I’m trying to do.
It would be great if someone could guide me on which formulas to use in query editor or DAX to accomplish this. I haven’t watched all Sam’s videos so if there is a video that talks about this type of situation, I’d appreciate it if someone could let me know.
Thank you for your help in advance.