Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Selecting Low Activity Customers

I am looking for an expression that will limit the results of a pivot table to customers that have not ordered anything in the past 3 years.

I have tired making the dimension: If(max(Yearord)<=Year(Today())-3,name) but this is not working.

1 Solution

Accepted Solutions
Not applicable

Re: Selecting Low Activity Customers

What I meant was to list out the customers and their last order year. Just to confirm if there are any such.

So from the data only b has not placed orders in the last 3 years. You can try the following:

if(aggr(max(Yearord),name)<=year(today())-3,name).

Regards,

Kiran.

4 Replies
Not applicable

Re: Selecting Low Activity Customers

Can you create a table with name and Max(Yearord), just to check if there are any records.

Regards,

Kiran.

Not applicable

Re: Selecting Low Activity Customers

I am not sure what you mean.

When I create a list box that has the name as the dimension with an added expression for max(Yearord) it displays fine. There are a few customers that have no returned value.

name     years ordered

a          2004

a          2006

a          2007

a          2010

a          2011

b          2004

b          2005

b          2006

c          2004    

c          2005

c          2009

c          2010

With the above example, I would like to only see:

name     years ordered

b          2004

b          2005

b          2006

Not applicable

Re: Selecting Low Activity Customers

What I meant was to list out the customers and their last order year. Just to confirm if there are any such.

So from the data only b has not placed orders in the last 3 years. You can try the following:

if(aggr(max(Yearord),name)<=year(today())-3,name).

Regards,

Kiran.

Not applicable

Selecting Low Activity Customers

This works. Thank you Kiran.