Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Chanty4u
MVP
MVP

Count(DISTINCT [order Name]) as Year

resident tablename

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

  Group by order,Year;

swuehl
MVP
MVP

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.