# QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save \$400. Learn More
Highlighted
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!

Tags (3)
1 Solution

Accepted Solutions
MVP

## Re: Use Only Function with Rank

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)

10 Replies
Esteemed Contributor III

## Re: Use Only Function with Rank

hi,

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

Esteemed Contributor III

MVP

## Re: Use Only Function with Rank

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

MVP

## Re: Use Only Function with Rank

How do you determine rank?

Not applicable

## Re: Use Only Function with Rank

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

## Re: Use Only Function with Rank

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

Not applicable

## Re: Use Only Function with Rank

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

MVP

## Re: Use Only Function with Rank

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

MVP

## Re: Use Only Function with Rank

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)