Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

Can we create a dynamic trigger?

Hi Everyone,

I have a Month field, and if I'm using a trigger to select only the Months until Last_Month.

For example:

I have Months until May - but I'm using a trigger to get only the Months until April. Suppose if the data is updated and now I have Months until December - then the trigger should automatically select Months until November.

Is that possible??

Thanks

Tags (2)
3 Replies

Re: Can we create a dynamic trigger?

How are you specifying the selection right now? One possible way could be to use Select in Field for everything <Maximum MonthYear.

I can give better advice if I can look at the some data and see how you are specifying it right now.

Best,

Sunny

MVP
MVP

Re: Can we create a dynamic trigger?

y= year field

m= month field

d=date field

this should create a (jan|feb|mar|apr)

='(' & concat({$ <y={"$(=year(Today()))"},d={"<$(=(MonthStart(Today())))"}>}distinct m, '|') & ')'

Employee
Employee

Re: Can we create a dynamic trigger?

My suggestion is a variable that contains the desired threshold value. Then use the variable in the search string when applying a selection action. See attached example where a button triggers selecting all YearMonth values besides the latest one.

Note that I use YearMonth and not Month, as a selection in Month would for example exclude the month in every year. YearMonth only exclude one specific month.