Forecasting using Forecast Measure Totals

Hi all,
Need a bit of help working this out.
I have a table of Total historical Sales that goes out to June 30 2020, as an example. I want to forecast past this date but instead of using the DateAdd( Dates, -1, YEAR), I would like July 1st Forecast to be an average of the previous 7days Sales. The issue I have is once I go past July 2nd, there is obviously not a full 7 days of historical Sales to calculate the average because the average range will be including July 1st in the range and there is no historical Sales for July 1st, only a Forecasted total using a calculated measure.
Once I get to July 8th, the only data I have for the previous 7 days period is the Forecasted Measure.
Therefore my question is, How do I Forecast out a selected date period using Measure totals or Virtual Data?
I hope this makes sense. Not sure how to best word this question :slight_smile:

Sorry I forgot to add, below is the DAX I used to get the previous day 7 for Forecasting.

Forecast Sales =
VAR LastSalesDate = CALCULATE( LASTDATE( tbl_Sales[Date]), ALL( Dates ) )
RETURN
IF( MAX( Dates[Date] ) > LastSalesDate ,
CALCULATE( [Total Sales],
DATEADD( Dates[Date], -7, DAY) ),
BLANK() )

Once I get to July 8th, it obviously does not calculate anything because there is no historical Total Sales.

Hi @Neil, we aim to consistently improve the topics being posted on the forum to help you in getting a strong solution faster. While waiting for a response, here are some tips so you can get the most out of the forum and other Enterprise DNA resources.

  • Use the forum search to discover if your query has been asked before by another member.
  • When posting a topic with formula make sure that it is correctly formatted to preformatted text </>.

image

  • Use the proper category that best describes your topic
  • Provide as much context to a question as possible.
  • Include the masked demo pbix file, images of the entire scenario you are dealing with, screenshot of the data model, details of how you want to visualize a result, and any other supporting links and details.

I also suggest that you check the forum guideline How To Use The Enterprise DNA Support Forum. Not adhering to it may sometimes cause delay in getting an answer.

Please also check the How To Mask Sensitive Data thread for some tips on how to mask your pbix file.

Hi @NeilJ, we’ve noticed that no response has been received from you since the 10th of March.

We are waiting for the masked demo pbix file, images of the entire scenario you are dealing with, screenshot of the data model, details of how you want to visualize a result, and any other supporting links and details.

In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved.