jeffrey_wang, Greg_Deckler, Oriolgaldon
The way I intend to use LINESTX in practice is for calculating betas and alphas of investments like hedge funds over different time periods. In my simplified example, Group plays the role of a specific investment, ID corresponds to a month-end date, Y is the return of the investment for that month, and X1 and X2 are monthly returns of factors I want to regress against.
Obviously, regression on a single data point doesn't make sense but I do need to be able to filter over different periods, like trailing 3 years or 5 years. This is why I tested filtering on the range 1-4 (not a single ID value). I need the calculation to work for a subset of the IDs, not just all of them.
I can get it to work exactly like I expect it to if I calculate the coefficient manually rather than with LINESTX. Here's a screenshot of an example closer to my actual use case:
In this example, LINESTX works fine when setting the period one at a time but returns blanks if it's used as a dimension with multiple values.