Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Sujayrsp
Contributor II
Contributor II

Count of Customers with one event

Hi All,

I have a data set containing  resembling below table.

ChannelEventCust
1XA
1XB
1YC
1ZD
1QA
2ZA
3ZB
4XD
1WE

The requirement is to get the count of customers having only one event per channel.

for example, here for channel1 ,we have 4 Customers having only one event( B,C ,D,E). so the count is 4.

I have to apply the logic for large data set to get this output.

waiting for your responses.

1 Solution

Accepted Solutions
ChiragPradhan
Creator II
Creator II

Hi ,

I think you want something like the attached solution. Bear in mind, this is not tested on a large dataset.

So, check how it performs. To optimize the performance, you could read the data from a QVD and use Autonumber where applicable. 

Hope this helps. If it is what you are looking for, please mark it as resolved.

Regards,

Chirag

View solution in original post

3 Replies
sergio0592
Specialist III
Specialist III

Hi,

In a text box for the Channel1, put this :

 

=count({<Cust={"=Count({<Channel={'1'}>} Event)=1"}, Channel={'1'}>} Cust)

 

Sans titre.jpg

 

 

 

 

 

Is it what you're trying to achieve?

Sujayrsp
Contributor II
Contributor II
Author

Hi, Thanks for the reply. It gives correct results in the front end. But I need to write the logic in backend as I have a large data set so that I can calculate it in run time. Please help me with this:) Thanks!!
ChiragPradhan
Creator II
Creator II

Hi ,

I think you want something like the attached solution. Bear in mind, this is not tested on a large dataset.

So, check how it performs. To optimize the performance, you could read the data from a QVD and use Autonumber where applicable. 

Hope this helps. If it is what you are looking for, please mark it as resolved.

Regards,

Chirag