Skip to main content
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
Partner - Champion
Partner - Champion

what your actual output and the desired one in UI ?
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)