Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

The Function for Linest_M

I am attempting to display multiple trend lines on a straight table and Chart through the use of the linest_M function.  Currently, the correct slope calculation appears only after I have selected Month

The below is the straight table:

Month2015 Act2015 PlanGapLinest_M
Jan50100-50
Feb21020010
Mar270300-30

My question is how do I display all linest_M values for each selected "Month" at the same time??

The trend lines is between Gap -- Month

My expression is

Gap = 2015 Act - 2015 Plan

=LINEST_M( RangeSum(Above(TOTAL Sum({$<PGroup={"Parts"}, PType={"Raw"} >} NettoVK1 ), 0, RowNo(TOTAL)))

-

Num(sum({$<PLGroup={"Parts"}, PLType={"Raw"} >} PAmount )*1000, '#.##'),Month)

2 Replies
MVP
MVP

Re: The Function for Linest_M

Please check the HELP for the linest_m function limitations when using nested aggregation.

I think you need to use advanced aggregation (the aggr() function ).

To better understand your setting, please post a small sample QVW and your expected outcome.

Not applicable

Re: The Function for Linest_M

Hi,

I checked the Help and updated the expression below:

LINEST_M(aggr(RangeSum(Above(TOTAL Sum({$<PGroup={"Parts"}, PType={"Raw"} >} NettoVK1 )-Num(sum({$<PLGroup={"Parts"}, PLType={"Raw"} >} PAmount )*1000, '#.##'), 0, RowNo(TOTAL))),Month),(aggr(rankMonth),Month)))

Community Browser