Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213916

Calculate Distinct Customers by Year based on Start and End Dates

$
0
0

I'm trying to find the correct expression to return DISTINCT counts of customers by Fiscal Year. Blank end dates means that they are current customers. Customers can be in multiple programs at one time, but should still only be counted as a single distinct customer. Here is an example of the dataset:

 

CustomerIDProgramIDStartDateEndDateFiscal Year StartFiscal Year End
11111/1/2013 2013 
22211/1/20147/1/201420142015
33311/1/2016 2016 
44416/1/201412/31/201520142015
33322/1/20165/1/201620162016

 

Here is the output that is needed:

 

Fiscal Year# of Customers
20131
20143
20153
20162

Viewing all articles
Browse latest Browse all 213916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>