Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
sspe
Creator II
Creator II

Select in field with searchstring

Hi,

I have some text objects that I use to select certain time periods in one of my applications.

In one case, I'd like to select some Date values based on another field in my Date Dimension, but I'm having troubles getting this to work.

I'm using the "Selct in Field" Action and I'd like to select all the dates that belongs to the date range  "This Month". I know I could simply just select the "DateKey - Range" = 'This Month' but for visibility I'd like to get all the DateKey values and then use these as my "Select in field" values.

If I write my expression like

" =max({<[DateKey - Range]={'This Month'}>} DateKey) "

then I get the max date in the "This Month" data range, but I can't figure out how I can make it return all the dates and use these in the selection? Can anyone help on this? It might very well be very simply but I just can't get my head around it.

Regards

Steen

1 Solution

Accepted Solutions
sunny_talwar

May be this (alter the two expression as per the requirement):

='>=' & Min({<[DateKey - Range]={'This Month'}>} DateKey) & '<=' & Max({<[DateKey - Range]={'This Month'}>} DateKey)

View solution in original post

3 Replies
giakoum
Partner - Master II
Partner - Master II

Not sure I understood, but why don't you just select "This Month" in [DateKey - Range];

sunny_talwar

May be this (alter the two expression as per the requirement):

='>=' & Min({<[DateKey - Range]={'This Month'}>} DateKey) & '<=' & Max({<[DateKey - Range]={'This Month'}>} DateKey)

sspe
Creator II
Creator II
Author

Hi Sunindia,

Thanks for the suggestion. This actually works and is quite similar to what I have done just with some data variable -  I just didn't think about doing it this way.

My concern is now if it's actually better and/or more readable than what I already did where I just used a date variable for the first and Current day of the month, but that's a different story..:-).

Regards

Steen