# New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

## Year

Hi

I am having 4 years suppose 2009, 2010, 2011, 2012. Now i am having customers in all the years. I have to display the customers who exists in 2009 but not in next two consecutive years but are regained in 2012. I only want to show the customers who were in 2009 & also at present but not in 2010 & 2011. I also don't want to show the customers others than of 2009.

Helppppppppp!!!!!!!!!!!!!!!!!!  on Urgent Basis

5 Replies
Partner

## Re: Year

Hi Vishn,

I don't know what type of chart you are using. However, if you use STRAIGHT chart. And the Year in LIST BOX

I have this example

 Year Customer Unit Purchase 2009 James 500 2010 Tony 310 2011 Wales 50 2012 Tom 108

So if I select 2009 (in List Box) you want to see customer in 2010,2011 excluding 2009 (which is the current selection)

My expression is, right click on th chart > expression > paste this SET ANALYSIS into the EDIT EXPRESSION BOX

sum( {\$<Year = {\$(=Only(Year)+1)}>}[Unit Purchase]) Click OK

Then for the 2nd year ADD (still at the expression)

and paste expression

sum( {\$<Year = {\$(=Only(Year)+2)}>}[Unit Purchase])

Click OK

With this, if you select 2010 in the list box customer for 2011 & 2012 will displayed, excluding current year selection.

Hope this help

Regards,

Gabriel

Not applicable

## Re: Year

Hey I am also working on this.

Gabriel I think you got the problem in wrong sense. I have to show the customers who were with me in 2009 but not in 2010 & 2011 but are regained in 2012.

I can sort out the customers which are in 2009 & 2012 by using the calculated dimension as =if(wildmatch(year,'2009',2010'),customername)

But here i also got the customers of 2012 which are new. Now how i should leave the new customers which were not in 2009 from 2012 customers.

Hope it explains you more

Not applicable

Not applicable

## Re: Year

Hi,

You probably have a field that states if the customer is new or old, or a date when the customer became a customer? If so, can't you just include it in the expression?

Honored Contributor III

## Re: Year

Hi,

go to this thread hope it help.