2 Replies Latest reply: Jul 27, 2015 6:53 PM by Marco Wedel

# Problem displaying linest_M in a straight table

I am attempting to display multiple trend lines on a straight table through the use of the linest_M function.  Currently, the correct slope calculation appears only after I have selected one “product-code”.

Here is my expression:

=LINEST_M(aggr(((sum(extMargin)/sum(extPrice))*100),[product-code],MonthYear),(aggr(rank(-MonthYear),MonthYear)-1))

current multiple selection output.  (three values are '-' and one is 0.366  which is incorrect)

current single selection output. (linest_M value is correct @ -2.17)

how do I display all linest_M values for each selected "Product-code" at the same time??

• ###### Re: Problem displaying linest_M in a straight table

thanks

regards

Marco

• ###### Re: Problem displaying linest_M in a straight table

Maybe

=LINEST_M(aggr(((sum(extMargin)/sum(extPrice))*100),[product-code],MonthYear),(aggr(rank(-MonthYear),[product-code], MonthYear)-1))