Forum Discussion
Create a weekly forecast chart
Anonymous - If you do not want to use the built-in forecasting of Power BI line chart (and I understand why because you want the start of the week but can't get that in continuous and categorical you can't use the built-in forecasting). Yes, you could create a forecasting measure. I actually have an example of that where I calculate the slope of the line and then project out. It's kind of complex but can be done. The best example is in my book, DAX Cookbook, Recipe 8 of Chapter 12. Probably more complicated than you need because it takes into account seasonality. But the same basic concept.
You can get the DAX here: https://github.com/gdeckler/DAXCookbook
- Anonymous5 years agoNot applicable
Thanks for your response. I'm not sure if you made a mistake with the file but looking at the pbix file from your link, this isn't what I'm looking for. It didn't look a forecast but a line graphs with multiple values. what amitchandak suggested gave me close to what i need except that the x-axis isn't showing the actual start of the week date, instead it shows the month year. Thanks
- Greg_Deckler5 years agoCommunity Champion
Anonymous - The concept is that you use categorical axis to get your starting week values. Your measure looks forward 2 weeks let's say. Now, you grab the last 2 data points for which you have actual values and you figure out the slope of that line. You use that slope to make your forecast predictions. That is the essense of what the example is showing only much more complicated because it is taking seasonality into account for the sales numbers.