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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Count Distinct clients by rank

Hello,

I would like to get a count distinct customer based on the rank of the family, only where the rank= 1. The objective is to obtain a histogram counting the distinct clients according to the preferred family


thanks yourank 1.JPG

1 Solution

Accepted Solutions
sunny_talwar

I am glad we were able to help. Please consider closing this thread if you are satisfied, or let us know how else we can help.

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny

View solution in original post

28 Replies
Anil_Babu_Samineni

May be this?

Sum(If(Rank(Sum(FieldName))=1, Sum(FieldName)))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

Sum within Sum won't work without Aggr()... May be this

Sum(Aggr(If(Rank(Sum(FieldName))=1, Sum(FieldName)), CodeClient, super_famille))

Sergey_Shuklin
Specialist
Specialist

Hello, Saoud!

I've generated some data with families. Please, look at the materials below, is this the task?

family.png

Anonymous
Not applicable
Author

Hello,

Thanks for your help but it's not exactly what i want because it count only one family but it is possible that a client like a different family  : example number 000000003

cout2.JPG

thanks

Anonymous
Not applicable
Author

Hello,

thank you for your reply, I tried your formula but it generates an error


regards

Anil_Babu_Samineni

Can you show the expression in image?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Hello,

image of expression

formule.JPG

thanks

Anonymous
Not applicable
Author

Hello,

image of expression

formule.JPG

thanks

Anil_Babu_Samineni

There is no any typo error, What would be the issue. And that i've seen you image of data too. Seems working. What are you trying for right side report

cout2.JPG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful