Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

canerkan
New Contributor III

Line Chart Showing Total of Customers

Hi everyone!

I am trying to show the total of our Customers in the course of the years in a line chart. Unfortunately it only shows the customers we've won per year not the Total of the years before. For clarification please find my sample qvf file attached.

Can someone help me add the customers we won the years before? The ones we lost should be disregarded.

 

For example: If we won 2 Customers in 1992 and 1 Customer in 1993 the line at 1993 should be up to 3 but it only counts the 1 from 1993...

 

Thank you very much in advance. Every hint or opinion is appreciated!

2 Solutions

Accepted Solutions

Re: Line Chart Showing Total of Customers

Are you looking for something like this?

image.png

Try this expression if above is what you want

RangeSum(Above(Count(Name), 0, RowNo()))
Highlighted

Re: Line Chart Showing Total of Customers

I think your lost information is based on another calendar which is not directly linked to your won calendar, right? I think in order to do what you want.... you would need to make script changes based. Look here for what I mean Canonical Date

7 Replies

Re: Line Chart Showing Total of Customers

Are you looking for something like this?

image.png

Try this expression if above is what you want

RangeSum(Above(Count(Name), 0, RowNo()))
canerkan
New Contributor III

Re: Line Chart Showing Total of Customers

Hi Stalwar1,

 

thank you very much for your prompt reply! This is was what I needed!

Do you know how to disregard the customers we lost?

For example: In 2001 it should be 5 instead of 7 because we lost 2 customers at the time.

 

Again, thank you very much!!

Highlighted

Re: Line Chart Showing Total of Customers

I think your lost information is based on another calendar which is not directly linked to your won calendar, right? I think in order to do what you want.... you would need to make script changes based. Look here for what I mean Canonical Date

canerkan
New Contributor III

Re: Line Chart Showing Total of Customers

Many thanks to you, Stalwar1. You helped me a lot! Even though I am not sure if I will understand what HIC is writing there... But I'll try my best.

 

Have a good one.

canerkan
New Contributor III

Re: Line Chart Showing Total of Customers

Hi Again @sunny_talwar

Can you help me putting in a second line, that shows the average age of the customers? I updated my sample file and added the Date of birth to it. I tried it with age() but it needs two expressions and I don't know what to put in for the first..

Re: Line Chart Showing Total of Customers

Would you be able to let us know what the output numbers are going to be for each of the years?
canerkan
New Contributor III

Re: Line Chart Showing Total of Customers

It should be like below

 Avg Age.PNG

Thanks again!