Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Luminary
Luminary

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

Re: Issue while using Rank() function with Sum function

what your actual output and the desired one in UI ?
Luminary
Luminary

Re: Issue while using Rank() function with Sum function

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?

Re: Issue while using Rank() function with Sum function

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

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