Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dukane24
Contributor III
Contributor III

Listing multiple expressions in a Search String

I'm trying to create a button action that will select the five latest dates loaded, using:

Max(DateField)

Max(DateField,2)

Max(DateField,3)

Max(DateField,4)

Max(DateField,5)

I know that in the Search String I can list out items like this: ("Date1"|"Date2"|"Date3"|"Date4"|"Date5")...

But what I'd like to do is list out the five expressions like this instead, and I haven't been able to get the syntax figured out.  I know that I can make five separate select actions, but I would really like to get them into one.  Is there a way to do this? I appreciate your help.

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

Hi Nate,

maybe Select in Field

='>='&Max(DateField,5)

Regards,

Antonio

View solution in original post

7 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Not sure but you can try this,

='("'& Max(DateField) &'"|"'& Max(DateField,2) &'"|"'& Max(DateField,3)&'"|"'& Max(DateField,4)&'"|"'& Max(DateField,5)&'")'


Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
antoniotiman
Master III
Master III

Hi Nate,

maybe Select in Field

='>='&Max(DateField,5)

Regards,

Antonio

sunny_talwar

Might make sense to add {1} in set analysis

='>=' & Max({1} DateField, 5)

Or if selections needs to be honored, then this

='>=' & Max(DateField, 5) & '<=' & Max(DateField)

antoniotiman
Master III
Master III

Hi think not needed because <=Max(Field) Always verified. however they don't hurt.

dukane24
Contributor III
Contributor III
Author

Perfect, thank you!

dukane24
Contributor III
Contributor III
Author

Thank you! Both of these worked as well.

sunny_talwar

Are you going to be using this without any selection being made? Or is this can be based on selection made....?