Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Trigger to select latest 3 half yearly

Hi have a requirement to select last 3 values from the list box :

2010HI

2010H2

2011HI

2011H2

2012HI

2012H2

2013HI

2014H2

2015H1

MOSTRECENT SIX MONTH


i want to apply a trigger to capture MOSTRECENT SIX MONTH,2015H1,2014H2? But i cannot hard code as when data refreshes it should capture last 3 values everytime.


Can any one help me on this?


Khushboo


7 Replies
Highlighted
MVP
MVP

Re: Trigger to select latest 3 half yearly

Try:

Search string: ='('&Concat({<Field={"=Rank(Dual(Field,Left(Field,4)*10+Right(Field,1)))<4"}>}Field, '|')&')'

PFA

Highlighted
Not applicable

Re: Trigger to select latest 3 half yearly

you forgot that i need to capture MOST RECENT SIX MONTH,2015H1,2014H2.

I need to capture most recent 6 month as well?

Highlighted
MVP
MVP

Re: Trigger to select latest 3 half yearly

I.e. only last two quarters, right?

Like

='('&Concat({<Field={"=Rank(Dual(Field,Left(Field,4)*10+Right(Field,1)))<3"}>}Field, '|')&')'


?

Highlighted
Not applicable

Re: Trigger to select latest 3 half yearly

The data like most recent six month is coming from DB.

so i need to select this string( most recent six month) and 2015H1 and 2014H2.

Last 3 values?

can we use rank on the script side and handle this?

Thanks a ton for your help.

Highlighted
MVP
MVP

Re: Trigger to select latest 3 half yearly

Well, is this string 'MOST RECENT SIX MONTHS' is fixed or it may come as 'Most recent 3 months' or so at times?

Highlighted
Not applicable

Re: Trigger to select latest 3 half yearly

This string is fixed .

Highlighted
MVP
MVP

Re: Trigger to select latest 3 half yearly

Then try:

='( "MOSTRECENT SIX MONTH" '&Concat({<Field={"=Rank(Dual(Field,Left(Field,4)*10+Right(Field,1)))<3"}>}Field, '|')&')'