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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
kamal_sanguri
Specialist
Specialist

Problem with set analysis

I am not able to figure out the problem with this Set Expression:

=count({<Author_Name = {"=rank(count({<Word_Count = {'>250'}>}Stories))<=5"}>}Stories)

I have written it to count the number of stories where Word_Count is over 250 with top 5 authors... This expression returns the number but not correct.. it is ignoring condition to check word_count > 250. Even if I change 250 to 100 there is no difference.

21 Replies
kamal_sanguri
Specialist
Specialist
Author

I think it's not working because this expression is only filtering the value just to calculate Ranks and not the count of Stories after ranks have calculated.

=count({<Author_Name = {"=rank(count({<Word_Count = {'>250'}>}Stories))<=5 "}>}Stories)

digvijay‌ you addressed this in your expression and hence it started working correctly.

=count({<Author_Name= {"=rank(count({<Word_Count = {[>250]} >}Stories))< 5"},Word_Count = {">250"}>} Stories

Please share your thoughts, if I am understanding it correctly?

Regards,

-Kamal

Digvijay_Singh

If there are multiple aggregation functions like count/sum in an expression. The set expression is needed to be written for all.

If you feel it solved your issue, you may like to close this thread.