Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

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)

chart.PNG

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

chart2.PNG

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

1 Solution

Accepted Solutions
MVP
MVP

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))

2 Replies

Re: Problem displaying linest_M in a straight table

please post sample app

thanks

regards

Marco

MVP
MVP

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))

Community Browser