Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

Function to generate Dynamic Values for Sheet On Select Trigger?

Greetings 'Hive Mind'

I have been bashing my head against this particular brick wall all afternoon!

I want to select a number of year /periods when I activate a particular sheet in Qlikview.

I am trying something like this:

=Text(Num(Year(Today()),'0000')) & '-' & Text(Num(Month(Today()),'00'))
& ' or ' &
Text(Num(Year(Today()),'0000')) & '-' & Text(Num(MonthStart(Today())-1,'00'))

Selecting a single value works fine (i.e. the top line) but I can't seem to work out the correct syntax to pass multiple values - Help!


4 Replies

Try the Toggle Select Action, believe that should likely let you do what you need to do here.


The Actions are documented in the Button object, but they are available to be called from the triggers as well...


To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
Contributor II
Contributor II


This is what I have been using but I can't seem to get the syntax of the formula right to select the field using the calculated values



Contributor II
Contributor II

What I am trying to do is the programmatic equivalent of this....



I have the formula to calculate the necessary values but I don't know how to incorporate it into the trigger action 


MVP & Luminary
MVP & Luminary

Try it with an approach like this one:

($(=date(today(), 'YYYY-MM'))|$(=date(addmonths(today(), -1), 'YYYY-MM')))

Helpful might be also to store the values of the current/last period within variables and use them for the selection.

An alternatively could be to select the wanted values through a numerical comparison, like:

>=$(=monthstart(today(), -1))

if there are no future dates and with them it could be look like:

>=$(=monthstart(today(), -1))<=$(=monthsend(today(), 0))

Similar numerical selections could be also done with numerical period-fields and/or running period-counters.

- Marcus