Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

jpapador
Valued Contributor

Linest Year vs MonthYear

I have a bar chart that shows units by month year.  I am trying to make a second expression that is a linear trend line.  When I use the first expression (Year) it works but displays in the fashion shown in the year attachment. 

When I try to use the Month Year expression it doesn't display anything (shown in MonthYear attachment).  Any ideas?

I think I am missing something simple:

Year Screenshot expression

Linest_M(TOTAL Aggr(Sum(Units), Year), Year)

*

Only( Year)

+

Linest_B(TOTAL Aggr(Sum(Units), Year), Year)

MonthYear Screenshot Expression

Linest_M(TOTAL Aggr(Sum(Units), MonthYear), MonthYear)

*

Only( MonthYear)

+

Linest_B(TOTAL Aggr(Sum(Units), MonthYear), MonthYear)

2 Replies
vinieme12
Esteemed Contributor II

Re: Linest Year vs MonthYear

if you want a trendline for each MonthYear, why not just add SUM(Amount) as line? you already have MonthYEar as dimension?

jpapador
Valued Contributor

Re: Linest Year vs MonthYear

Sum(Amount) is the expression that produces the blue bars.  Sum(Amount) just gives you the sum by month, not a linear trend line.