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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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
Partner - Champion II
Partner - Champion II

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

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

Rank( Total -Date, 4 )

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
Anonymous
Not applicable
Author

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