Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Inverted rank function

Hello,

I have the following table :

IDDate
110/11/208
209/11/2018
312/11/2018
407/11/2018

I would like to add a rank function in order to know the order of each product. I would like to have the the first date as number 1 like following

IDDateRank
110/11/2083
209/11/20182
312/11/20184
407/11/20181

Could you please help me ? I tried the rank function but it's not working the way I want. And I would like the function to adapt to others filters that I can have...

Best regards,

Caroline

6 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

>> but it's not working the way I want...

I think you need to describe what it is you want.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

I would like to have the minimum date in the rank 1 instead of the maximum rank

OmarBenSalem

aggr(rank(-sum(Date),ID),ID)


Capture.PNG

Anonymous
Not applicable
Author

I tried the following expression : =Count(TOTAL MSN)-rank([New Total Date début])+1

It seems to work.

Thank you for answering !

agigliotti
Partner - Champion
Partner - Champion

let's try using the below expression for Rank column:

Rank( Total -Date, 4 )

Anonymous
Not applicable
Author

= Count(Total ID) - rank(date) +1