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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
Himanshu
Contributor II
Contributor II

Issue while using Rank() function with Sum function

Hello everyone,

I am using the below expression to get the rank of products by the sum of patient count, i,e the product with highest patient count gets rank 1. 

The fifth and sixth product have same count and thus it is showing the sumof both these products. Is there any way to get the only one of the product out of those two.

please find the expression below:


=SUM({<PRODUCT = {"=Rank(PRODUCT),10)=1"}>}PATIENT)

 

 

 Thanks in advance.

3 Replies
agigliotti

what your actual output and the desired one in UI ?
The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
Himanshu
Contributor II
Contributor II
Author

I want the top 5 products from this function by writing 5 different expressions for 5 products but the fifth rank is having two products with same value. Is there any way to get  only one of the products out of the two for fifth rank?

sunny_talwar

Your expression doesn't look right to me (the part in red). Does this expression really works?

=SUM({<PRODUCT = {"=Rank(PRODUCT),10)=1"}>}PATIENT)