Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count Distinct Customer per day

Hi all...

I need to count the distinct customer per day, but only new clients on day/week.

For example, if the customer appears on first day of the week, he will only count in this day... if i sell to 10 customers on monday and 8 on tuesday (but 3 of then also buy on monday), i need to show only 5 on Tuesday, in one Pivot Table.

I'm trying to use Set Analysis.

Thank you very much
Scatamachia

1 Solution

Accepted Solutions
Not applicable
Author

Hi Julian,

I would create a flag in the script that indicates that a given transaction is the first transaction ever made by this user and then use this flag in the expression. See attached an example that may give you some ideas

Cheers

Karol

View solution in original post

5 Replies
Not applicable
Author

Hi Julian,

I would create a flag in the script that indicates that a given transaction is the first transaction ever made by this user and then use this flag in the expression. See attached an example that may give you some ideas

Cheers

Karol

Not applicable
Author

Thank you Karol... I'll try this... great solution...

Best Regards

Not applicable
Author

I have one problem... I need to do this (new customer per day, in one week) by Supervisor, Salesman etc... so my script will be to slow... can I do it using Set Analysis?

regards
Julian

Not applicable
Author

Look once again at the example that I attached. You have a date field there. Create new fields like week, day, month. year, and the code that creates a new cust flag will work for those fileds too! You will be able to see new customers not only per date by also per week, per month etc

If I had more information associated to my simple transaction table, like supervisor name, I would be able to calculate new customers per any lookup table associated with transaction. I would be able not to say not only how many new customers I had in a given week but also break it down by supervisor.

Regards

Karol

Not applicable
Author

Hi Karol.

My problem is that one customer can appear in more than one supervisor, in same week. In this case, this customer needs to count s new customer in both supervisors.

I'll try. One more time, thank you very much for your help.

Best Regards
Julian