Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Partner
Partner

How to??/

I am trying to create a trend line, but I am having some issue.  I have a single measure, but need to have lines for some products, but not all products (the product lines will never change).  I need to be able to filter the chart by customer (that part I have), but I also need to display a national trend for the same fitlers products.

Unfortunately for company policy, I can't post the qvw file

Any guidance is appreciated!

7 Replies
MVP
MVP

Re: How to??/

You can obviously create sample data and post them here!

agomes1971
Valued Contributor II

Re: How to??/

Hi,

have you checked this:

Linear regression

Hope it helps

André Gomes

Partner
Partner

Re: How to??/

Have a look at qlikview sample file : Data Visualization

it has a good sample for trendlines.

Not applicable

Re: How to??/

Create individual expression for each product, that way you can have a trend line for each one. Hope this helps.

Highlighted
Employee
Employee

Re: How to??/

Hi Frank,

If you want to have independent trend lines for some products but not others you might need to create a unique expression for each product using set analysis, or an expression for those with trend lines and one for those without.

Using a set analysis like:

Sum({<Product={'ProductA'}>} Measure)

Would produce a line showing the measure for Product A on which you can show a trend line. You can then make the expression invisible using the tick box on the Expressions tab, but the trend line will still show.

Probably not a complete solution but this might suggest a direction you can go in to get the results you want.

Independent trend.png

Partner
Partner

Re: How to??/

Adam

Thanks.  I was able to get the trend line  for the certain products for a given customer, but how can I get a national product trend line?  I know where to add the trend, but I need some help on the calculation.

thanks

Employee
Employee

Re: How to??/

Perhaps look into something along the lines of Sum(TOTAL <Product> Measure) to take the sum of the measure over all products.

Sum(Measure) / Sum(TOTAL <Product> Measure) might give you what you want, though I haven't had time to test this out.