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

Deflaut latest 6 days in selection

Hi,

I have a multi box with the Extract Date:

   

Extract_Date
28/05/2016 00:20
29/05/2016 00:10
30/05/2016 00:18
31/05/2016 00:18
01/06/2016 00:20
02/06/2016 00:19
03/06/2016 00:13
04/06/2016 00:18
05/06/2016 00:20
06/06/2016 00:13
07/06/2016 00:14
08/06/2016 00:22
09/06/2016 00:22

10/06/2016 00:20

As a default I want the last 7 days to be selected whenever a user opens the qvd.

In the Trigger box>>Search String, how can I put max 7 entries?

Thanks.

1 Solution

Accepted Solutions
sunny_talwar

Sample attached for you to play around with

View solution in original post

9 Replies
sunny_talwar

May be like this:

='>=' & TimeStamp(DayEnd(Max(Extract_Date)), 'DD/MM/YYYY hh:mm') & '<=' & TimeStamp(DayStart(Max(Extract_Date) - 7), 'DD/MM/YYYY hh:mm')

='<=' & TimeStamp(DayStart(Max(Extract_Date) - 7), 'DD/MM/YYYY hh:mm') & '>=' & TimeStamp(DayEnd(Max(Extract_Date)), 'DD/MM/YYYY hh:mm')


='>=' & TimeStamp(DayStart(Max(Extract_Date) - 7), 'DD/MM/YYYY hh:mm') & '<=' & TimeStamp(DayEnd(Max(Extract_Date)), 'DD/MM/YYYY hh:mm')


Updated based on digvijay‌'s response below.

Updated 2nd time again based on digvijay‌'s response below

PradeepReddy
Specialist II
Specialist II

Document Properties-->Triggers-->Document Event Triggers-->On Opening-->'Select In Field'

Field: Extract_Date

Search String: >=max(Extract_Date)-7

Digvijay_Singh

I think '>=' and '<=' misplaced

sunny_talwar

Kushal_Chawda

Create the Button Action or Open Trigger -> Select in field, put below expression

= '(' &concat( distinct {<Extract_Date={">=$(=timestamp(max(Extract_Date,7),'DD/MM/YYYY hh:mm'))"}>} chr(34) & Extract_Date& chr(34) ,'|') &')'

Digvijay_Singh

you now reversed the position of conditions, I think still the same effect.

sunny_talwar

Sample attached for you to play around with

sunny_talwar

Should be good now, I think

Not applicable
Author

Thank you, this worked!