Qlik Community

Qlik Sense App Development

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

Highlighted
heiko_schmidt
New Contributor

Adding 2 different trend lines

Hello, i use a function to show a trend line :

linest_b (

          total aggr(

              Sum(Expression1),

               [Month]

           ),

           [Month]

      )

+

  Month *           

      linest_m (

          total aggr(

              Sum(Expression1),

               [Month]

           ),

           [Month]

      )

This one calculates the trend line for all available months.

Is it possible to show a second trend line in the same diagramm that only shows the trend for the past 6 months and a third one that shows the trend line for past 3 months to 3 months in advance.

Best regards

Heiko

4 Replies
Partner
Partner

Re: Adding 2 different trend lines

It is possible..

Add 3 different measures in line chart

heiko_schmidt
New Contributor

Re: Adding 2 different trend lines

Hello, Shraddha, thank you for your response.

Maybe the question was a little bit confusing. I know that it is possible.

I just don´t know how to set the right time interval.

Best regards

MVP
MVP

Re: Adding 2 different trend lines

Its hard to give detailed help without more information. Are you using a master calendar? In general, you would add set expression filters to the linest() function and/or the sum() functions inside the Aggr() expression.

I suggest that you upload a small sample file that contains enough data to get more detailed help.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
heiko_schmidt
New Contributor

Re: Adding 2 different trend lines

Hello Jonathan, yes I am using a master calendar.

Here is the sample file.

I want to show one trend line over all available months ( this already works) and another trend line for the last 6 months dynamically.