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: 
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

28 Replies
sunny_talwar

What sort of error does it display? can you share the error message or a snapshot of the error message?

Anonymous
Not applicable
Author

On the right report I would like it also counts clients rank equal 1 on other families as the "KITCHEN"


family.JPG


regards

Anonymous
Not applicable
Author

hello,

here is the error

expression2.JPG

thanks

sunny_talwar

You are using this as a dimension? What is the final output you are looking to get? I thought that this was an expression....

Anonymous
Not applicable
Author

no sorry

I am looking to get a discount from customers on preferred families


thanks

Anil_Babu_Samineni

I assume, You require nested aggregation over here, Would it possible to share sample application

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

What would be the output in a table form that you want to see? What are the dimensions?

Anonymous
Not applicable
Author

here is table, I would like  this report

tb.JPG !

thanks

Anonymous
Not applicable
Author

an example

Thanks

Anil_Babu_Samineni

I opened your machine, You are calculating only for first rank, That is how it return only for that

Capture.PNG

And, i used this? and i got it as below

If(Rank(Sum(DISTINCT customer_code))<=4, Sum(DISTINCT customer_code))

Capture.PNG

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