Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Manual trendline for two dimensions

Hey all,

I'm trying to replicate the automatic chart trendlines (that you get by ticking a box) in an expression with LINEST_x functions. Everything works smoothly for one dimension (see the code below), but when I add a second dimension to the chart it won't produce two different lines, but still has one and the same (or maybe there are two line, but they have exactly same values).

     = LINEST_M(TOTAL AGGR(AVG(measure),dimension),dimension) * dimension
      +
LINEST_B(TOTAL AGGR(AVG(measure),dimension),dimension)


I've tried adding AGGR(dimension,dimension2) inside and outside of LINEST function, but this didn't change anything. Running out of ideas, so any help would be much appreciated.


If you are wondering why I want to do this in the first place, it's because modifying the expression a bit gives an exponential curve, which one can use to sum the are under the curve and use it as a component in another calculation. But this problem is preventing me for using the whole thing for anything else than for one dimension at a time.


Best

Joonas

1 Reply
Not applicable
Author

if i want to add a trendline with equal to A+B*X ....izzit possible to do it?and hw sould i do it?