Skip to main content
Announcements
Qlik Community Office Hours - Bring your Ideation questions- May 15th, 11 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
kritikak
Contributor
Contributor

Insert two Dates with one year difference in search string while triggering the Multibox.

i want to Insert two Dates with one  year difference in search string while triggering the Multibox so that when i open my sheet by default teh two dtaes are being selected. One should be the max(timekey) other should be year before the max(timekey).

 eg date 1= max(timekey) = jul18 then date2 should be =jul17

i am using ='('max(Timekey)&'|'& AddYear(max(Timekey),-1)&')'  by facing issues

1 Reply
marcus_sommer

Try it with:

$(= '(' & date(max(Timekey), 'MMMYY') & '|' & date(AddYear(max(Timekey),-1), 'MMMYY') & ')')

whereby Timekey must be a numeric or a dual-value and your default variable (at the start of he script tab main) must fit to the formatting of your field Timekey.

- Marcus