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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Use Only Function with Rank

Hi experts,

How can I show only the Field with rank = 2?

I'm trying with this expression but it give me an error (bold)

=only({<Rank(FIELD1)=2>} FIELD1)

I'm trying this in a text object!

Thanks!

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

But on what basis? Second highest value in Field1?

May be this:

Only({<Field1 = {"$(=Max(Field1, 2))"}>}Field1)

or

Only({<Field1 = {"$(=Max({1}Field1, 2))"}>}Field1)

View solution in original post

10 Replies
Chanty4u
MVP
MVP

hi,

=only({1<Rank(FIELD1)=2>} FIELD1)

Chanty4u
MVP
MVP

Kushal_Chawda
MVP
MVP

How you are deciding the Rank? what is the criteria?

sunny_talwar
MVP
MVP

How do you determine rank?

Not applicable
Author

Hi Chanty 4u,

Thanks for your response but it still give me an error The datetype of my field is time, I don't know if it have any value to this

Not applicable
Author

When I put Rank = 2 i'm thinking about the second position (the first second position)

Not applicable
Author

When I put Rank = 2 i'm thinking about the second position (the first second position)

Kushal_Chawda
MVP
MVP

I am still not clear. Can you show the sample data with expected output?

sunny_talwar
MVP
MVP

But on what basis? Second highest value in Field1?

May be this:

Only({<Field1 = {"$(=Max(Field1, 2))"}>}Field1)

or

Only({<Field1 = {"$(=Max({1}Field1, 2))"}>}Field1)