Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Pre-selecting the last 5 entries of a list

Hello,

I have a list that contains entries based on a name and a number.

Example:

Brand 1

Brand 2

Brand 3

Brand 3.1

Brand 3.2

Brand 4

Brand 5

Brand 5.1

Brand 5.2

Brand 5.3

Brand 6

Brand 7

What I try to figure out is how to set the trigger on open document as such that it shows only last 5 values of that particular list.

In this example only:

Brand 5.1

Brand 5.2

Brand 5.3

Brand 6

Brand 7

I was thinking about maxstring but maxstring gives me only the last value...

Any ideas?

2 Replies
JonnyPoole
Former Employee
Former Employee

Hi ,  i was able to get this to work with a 'select in field' action on the Brand field where :

The search string is:   =$(vSearchString)

And the vSearchString variable has a definition of:   '=rank(TOTAL Brands)<=5'

MK_QSL
MVP
MVP

Temp:

Load * Inline

[

BRAND

Brand 1

Brand 2

Brand 3

Brand 3.1

Brand 3.2

Brand 4

Brand 5

Brand 5.1

Brand 5.2

Brand 5.3

Brand 6

Brand 7

];

Final:

Load BRAND, RowNo() as ID Resident Temp Order By BRAND;

Drop Table Temp;

Use below as a Document On Open Trigger with SELECT IN FIELD

='<='&Max(ALL ID)&'>='&(MAX(ALL ID)-4)