Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show Dates Less Than or Equal to Selection

Hi All,

I have a date field [LastModifiedDate]. When i make a selection on this feild it drills the data down to the specific dates that are selected.

What i want to do is to be able to show all dates less than of equal to the dates i have selected.

e.g. when i select 16Mar i want it to show all record with a [LastModifiedDate]<= 04Jan.

The way i have it at the moment it only shows data equal to 04Jan

I have attached a sample of the data........

Thanks in advance

James

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

New file. Step-by-step in tabs w/ screendumps. Script should be as previous. The DateSelection needs to be a data island (i.e. not connected to the rest of the data model).

Copy paste the script I gave you above and use this new file for a step-by-step with screen dumps.

hope it helps.

View solution in original post

15 Replies
Not applicable
Author

hi

do like this..

goto settings-> document properties -> field event triggers and click the date field and add a action "select field" action.

give the field name and value as an expression what u want.

i think it may helps u, if it is not proper to u plz ignore my ans.

regards

A'run'

Not applicable
Author

Not sure i understand

would you be able to do it on the attached file and send it back??

Many thanks

Not applicable
Author

Hi James,

A good way around this is to create an Advanced Search attach it to a bookmark and then apply it with a button.

Step-by-Step:

1. Create a data island for your dates. I.e. if you have a calendar and the field is named Date, do a resident reload of the Date from the calendar where you alias the field to, e.g., SelectionDate.

2. Create an object in the front-end where you can make a selection on this SelectionDate, e.g. a calendar.

3. Put in a Listbox for Date (from the calendar), right-click on it and select Advanced Search (Ctrl+Shift+F). In the advanced search box, put in a search string such as "=Date <= SelectionDate" and click on Go. This should make the right-selection on the Date field. N.B. Keep the Advanced Search box open! Do not close it.

4. For visual purposes, right-click on the SelectionDate and clear the selections. (This should still hold your Date selections unchanged).

5. With the Advanced Search box open, create a bookmark. This will include the advanced search string in the bookmark.

6. Create a button which applies this bookmark.

With the combination of the calendar object based on SelectionDate and the button which applies bookmark, you should get your desired result.

Not applicable
Author

Check attached QVW.

Not applicable
Author

Hi

Struggling to make it work... i believe i have followed your instructions, up to point 3 where it should be making my desired selections.

using this expression in advanced search on Last modified date "=[Last Modified Date]<=[Selection Last Modified Date]"

See attached file

Thanks again

Not applicable
Author

Hi,

This is what your script should look like. Try the step-by-step with the new script it should work.

Table:
LOAD
[Claim Number] AS [Claim Number],
[Last Modified Date] AS [Last Modified Date]
FROM
[QV Test.xlsx]
(ooxml, embedded labels, table is Sheet1);


DateSelection:
LOAD
[Last Modified Date] AS [Selection Last Modified Date]
Resident Table;

Not applicable
Author

New file. Step-by-step in tabs w/ screendumps. Script should be as previous. The DateSelection needs to be a data island (i.e. not connected to the rest of the data model).

Copy paste the script I gave you above and use this new file for a step-by-step with screen dumps.

hope it helps.

Not applicable
Author

i'll give it a go

you have been really helpful!!

Not applicable
Author

No probs. This date selection issue is part of the "darker", obscure arts of QlikView and is not readily documented. It's that SAP style of clients want to select start & end dates and see all values inbetween. This is the only workaround I know of. Tell me if you got it to work.

Hope you get joy.