Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
nigel987
Creator II
Creator II

Default selection on calculated field

Hi,

I want to have some fields selected by default when opening the sheet.

Therefore I added a trigger in the document properties.

My field is names "date" and has the form 2015.05.19. I have several list boxes which show the year (=Year(date)) or the month (=Month(date)).

Okay, so when adding the trigger, I have to enter a field and a value. I would assume that my field is "date" and my selected value is =Year(today(1)).

But this does not work. The year in the listbox is not selected. Does anyone know what I am doing wrong here?

Thanks!

2 Replies
swuehl
MVP
MVP

Qv tries to match a value like 2015 (=Year(today(1))) to date values (like 2015.05.19). this obviously won't work.

2015 <> 2015.05.19

Either create a year field in the script (recommended), or try a selection in date field using a search string in the action like

='>=' & Date(yearstart(today()),'YYYY.MM.DD')

nigel987
Creator II
Creator II
Author

HI swuehl,

creating a new field in the script worked fine for me. Thanks for the advice.