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

Rank Function in a TextBox

Hi,

I am encountering an issue.  I have used the below formula, which results in the product detail (Column2) returning the product name as seen below.

=if(rank(fabs(sum({<DocType = {'C','D'},CredReasonDescription -= {'Cancelled Invoice','Full Order Return'}>}ValueAdj))/sum({<Warehouse = {'01','62','63'},DocType = {'I'}>}ValueAdj),1,1)=1,ProductDetail)

  Example of result:  

011067-
011081Product 1
011088-

I want to create a variable containing the name of the product ranked 1, and create 9 others, in order to use the variable in a graph.

However, when I add the above formula to a text box, it only returns a null value.

Does anyone know why?  I'm suspecting it is because there are more than one product that is ranked number 1, however, I am not too sure which rank mode to use to negate this.  Please can someone possibly assist?

Regards.

1 Reply
tresesco
MVP
MVP

Try using concat() like:

=Concat( Aggr( <YourExpression> , ProductDetail) , ',')

If there are more than one products, all will be shown you can check.