Qlik Community

Qlik Sense App Development

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

Not applicable

How to create a group of customers with at least one order each year

Hi guys,

I need to create a list of customers that have completed at least one order within each year in the last 5 years. May I use a Set Analysis or do you suggest another way?

Thanks in advance

Gianluca

2 Replies
sureshqv
Esteemed Contributor III

Re: How to create a group of customers with at least one order each year

Count(DISTINCT [order Name]) as Year

resident tablename

Where order='' and (Year ='2010' or Year='2016')

  Group by order,Year;

MVP
MVP

Re: How to create a group of customers with at least one order each year

Create OrderYear from OrderDate in your script.

Then create a table chart with dimension Customer and as expression:

=Sum(

{<CustomerID = {"=Count({<OrderYear = {2011,2012,2013,2014,2015} >} DISTINCT OrderYear)=5"}>} SalesAmount)

If this works, we can also make the OrderYear field modifier dynamic.

Community Browser