Skip to main content
Solved

Dimensions of "seasonality" argument for SEASONAL_LINEAR_REGRESSION

  • December 4, 2024
  • 9 replies
  • 123 views

William Murray Brown
Author
Forum|alt.badge.img+5

The documentation for the SEASONAL_LINEAR_REGRESSION function states that the “seasonality” argument can have the following dimensions:

No Dimension or Dimensions of Text 1

I have two questions about this…

  1. When I try to use a metric with no dimensions as this argument, I get the error “Function SEASONAL_LINEAR_REGRESSION requires argument 2 to be a positive integer”. What am I doing wrong? The metric where I’m using SEASONAL_LINEAR_REGRESSION has three dimensions (month and two non-time dimensions).
  2. What does “Dimensions of Text 1” mean?

Best answer by Pierre

Hello William, 

 

I adjusted the documentation, the second parameter of the SEASONAL_LINEAR_REGRESSION function must be an integer “hardcoded” in the formula, like in documentation examples. 
Sorry for the confusion.

 

Pierre

9 replies

Benoit
Community Manager
Forum|alt.badge.img+15
  • Community Manager
  • December 6, 2024

Hi,

 

I suppose “Text 1” here means Argument 1.

The dimensions of the seasonality metric have to be aligned with the source metric.

 

And the metric has to be of type = integer. (instead of number)

Do you confirm you’re using the integer type?

 

Thank you.


William Murray Brown
Author
Forum|alt.badge.img+5

Hi Benoit, thanks for the reply.

Yes, the metric is of type integer, and its dimensions match those of the source metric, so I think everything is ok there.

My suspicion is that the seasonality argument needs to be hard-coded in the formula, rather than being in a separate metric (the documentation doesn’t explicitly state anything about this). Is anyone able to confirm that? If that’s the case, then I feel that would significantly limit the usefulness of this function…

Thanks


Benoit
Community Manager
Forum|alt.badge.img+15
  • Community Manager
  • December 6, 2024

No, I’ve already made it work with a dynamic separated metric, which is more handy to play with the function.

 

What is the error you are facing, can you maybe share a screenshot of the formula + error?

 

Thanks,


William Murray Brown
Author
Forum|alt.badge.img+5

Oh good, I’m glad to hear that it should work!

Here’s the metric I’m trying to use the function in, along with the error message:

 

 

… and the structure of that metric:

 

 

… and here’s the structure of the ‘VOL_FCST_CHAN_LINSEA_Parameter Seasonality Int’ metric:

(‘VOL_FCST_CHAN_LINSEA_Parameter Seasonality Int’ doesn’t actually need Month as a dimension, but I added it in case it helped to align the dimensions to the target metric)

 

All cells in ‘VOL_FCST_CHAN_LINSEA_Parameter Seasonality Int’ are currently blank and they will be populated by users.

 

Thanks


Benoit
Community Manager
Forum|alt.badge.img+15
  • Community Manager
  • December 9, 2024

Hi, 

I can’t make it work, I’ll create a ticket in your name to have a Support review on this situation.

Many thanks for your patience and understanding.

Best,


William Murray Brown
Author
Forum|alt.badge.img+5

Ok, thank you Benoit!


Pierre
Community Manager
Forum|alt.badge.img+9
  • Community Manager
  • Answer
  • December 10, 2024

Hello William, 

 

I adjusted the documentation, the second parameter of the SEASONAL_LINEAR_REGRESSION function must be an integer “hardcoded” in the formula, like in documentation examples. 
Sorry for the confusion.

 

Pierre


Benoit
Community Manager
Forum|alt.badge.img+15
  • Community Manager
  • December 10, 2024

And I’m sorry as well because the seasonility function I’ve got to work with this paratemer was
 

 


William Murray Brown
Author
Forum|alt.badge.img+5

Thanks for your help, Pierre & Benoit!