Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to count...

Hi Everyone,

Here's a simple one for you:

The way that my data is set up is that for every deal, all the products sold in that deal is listed for each rep that was involved in the deal.  Thus, for a deal with 2 products and 3 reps (3x2) there are 6 rows of data.  However, if I want to count the number of reps on a deal, it will count the number of instances of a name, and the answer will be 6, not 3.

What expression can I use to only count unique instances of a name in a deal?

Thanks for your help

Deal IDProducts SoldSales Rep
Deal 1BikeJohn
Deal 1BikeJames
Deal 1BikeMary
Deal 1PumpJohn
Deal 1PumpJames
Deal 1PumpMary
Deal 2TiresJohn
Deal 2TiresJames
Deal 2TiresMary
Deal 2HelmetJohn
Deal 2HelmetJames
Deal 2HelmetMary
1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Hope this is what you are looking for...

View solution in original post

5 Replies
Not applicable
Author

Hi

PFA hope it will help you

Nirmal

Not applicable
Author

Hi

PFA,,, Hope this will reach your acheivment

MK_QSL
MVP
MVP

Hope this is what you are looking for...

Not applicable
Author

Hi Nirmal,

Thanks for the response.  Based on your suggestion, I would need to split out the Deal ID, but in reality, I cannot split it out.  The example I posted is simply for demonstration.  If I cannot split out the Deal ID, is there another way?

DealIDProducts SoldSales Rep
Deal1BikeJames
Deal1BikeJohn
Deal1BikeMary
Deal1PumpJames
Deal1PumpJohn
Deal1PumpMary
Deal2HelmetJames
Deal2HelmetJohn
Deal2HelmetMary
Deal2TiresJames
Deal2TiresJohn
Deal2TiresMary
Not applicable
Author

Thanks Manish.