Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Identifying count of new customers

Data is:

[Customer Name],[Year],[Order Number],[Amount],... etc

I want to be able to show, when a year is selected, the count of new customers that year. i.e. the count of distinct [Customer Name] (yeah, I know it should be a proper key but this is an example) for the year in question where that [Customer Name] does not exist within the list of distinct [Customer Name] for all prior years - been trying various syntaxes but getting stumped either with error or wrong answer what's the ebst way to debug these kinds of expressions (plues, of course, what's the syntax I need? (or a poke in the right direction!).

Tom

3 Replies
rajeshvaswani77
Specialist III
Specialist III

Hi,

Look at using set analysis. P and E might be helpful.

thanks,

Rajesh Vaswani

MK_QSL
MVP
MVP

=COUNT(DISTINCT {<Year = {'$(=Max(Year))'},Customer = E({1<Year = {'$(=Max(Year)-1)'}>})>}Customer)

Not applicable
Author

Thanks Manish, will try this. Out of interest, what are the tips for debugging these kinds of statements? ie getting a list of records which meet each contituent part of the expression to confirm the numbers are what is expected?

Thanks,

Tom