Linear Forecast: Selecting Ranking Dimensions

  • 31 October 2023
  • 4 replies

Hi there! On the topic of the FORECAST_LINEAR formula: Is there a way to select certain values for the ranking dimension? For example, if:

  • Forecasted Sales =FORECAST_LINEAR('Sales','Month’)
  • Is there way to choose certain months you want to use for the regression? In my case I am trying to using TTM (which I currently have as a Boolean property of Month)

Best answer by Benoit 3 November 2023, 17:06

View original

4 replies

Userlevel 6
Badge +12


I don’t think it’s possible to choose certain months in the ranking dimension because it has to be the dimension itself.

However, given that Sales uses Month, maybe you can try to filter your source data like this:

FORECAST_LINEAR('Sales’[filter: Month.boolean],Month )


Hope this helps.

Please let us know how it looks.



Thanks, yes filtering on the source data worked. Thanks Benoit.

Userlevel 2
Badge +1

Hello @connorsmith ,


Benoit beat me by a few minutes with the exact same idea I had, but since I did try to do a comprehensive demo, I believe it is still worth it sharing it.

I have made two calculations, one where the Linear Regression is manually calculated and the other using FORECAST_LINEAR.

I have then done it in a such a way that the when the Exclude boolean changes, the “Valid Period” is recalculated to ignore the period excluded - find table below.



As you can see above, y = mx + b does not include the excluded periods in the calculation of the linear regression, while FORECAST_LINEAR is just excluding them from the base data set.

As you can see in the picture below, ultimately the result is the same.


I hope the above makes sense and complements @Benoit response!

Thanks for the demo Bruno, this looks like a great use case :)