Forum Discussion
How to do a Forecast?
- 10 years ago
Try taking a look at the following links. Hope this helps.
Issue One:http://www.daxpatterns.com/cumulative-total/
Issue Two: http://blog.gbrueckl.at/2015/04/recursive-calculations-powerpivot-dax/
Sorry for the bit of Thread necromancy but I'm having an issue. I used David's solution to attempt to do a forecast and I can't understand the behavior that is occuring with the visual.
I have a count and a Trend count, I also have some filters on the side.
After I click on any filter the Values disappear for the Trend Line when using the line and stacked column chart.
I used “see data” on the first visual, and the Data is there for Claims (trend 2)
I did this on the 2nd Visualization as well, where the Trend Line vanishes. But when I look at the See data there Is data for those dates. Any idea what’s going on?
The one thing you will have to do is have a separate table with the dates - which is a parent to the table with the actuals and the forecast DAX. Otherwise, the DAX formula only looks at previous dates. If you look at the example file in the article, you will see the date table and the joins. Hope this helps.
http://fountainanalytics.com/wp-content/uploads/2016/09/TimeSeriesForecast.zip
D
- SGLake8 years agoFrequent Visitor
David,
Do you think there could be an issue with your prior day formula? It's referring to the site_data[date], -1 but the others like prior week are looking at the CSV_datelookup[date].
Pageviews (Prior Day) =
SUMX(
CALCULATETABLE(Site_Data,
DATEADD(ALL(Site_Data[Date]),-1,DAY),
ALL(Site_Data[Date])),
Site_Data[Pageviews])Pageviews (Prior Week) =
SUMX(
CALCULATETABLE(Site_Data,
DATEADD(CSV_Datelookup[Date],-7,DAY),
ALL(Site_Data[Date])),
Site_Data[Pageviews])