Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

using a trigger to match a value

Hi, I am using a trigger to select the latest month value viz. Jan-12.

Actions - Select in Field

Currently this value is hardcoded in the 'Search String' section.

I tried putting this expression "=month(date(addmonths(today(),-1)))" so that the value changes with every month but it is not working.

The selection trigger doesn't seem to work.

Any suggestions please.

Thank you

8 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     It will work If you have month field and the expression should not be enclosed in double qoutes.

     Expression will be =month(addmonths(today(),-1))

Hope it helps

Celambarasan

vijay_iitkgp
Partner - Specialist
Partner - Specialist

Hi,

Please do not put expressions in Quote. It will work without quote.

Not applicable
Author

Hi Celambarasan,

It still doesn't work.

I have the following values in the table:

Dec-11

Jan-12

Feb-12 etc.

In the search string, if i put Jan-12, selection works but when i use an expression like =month(date(addmonths(today(),-1))) it doesn't work.

BTW, this expression returns only the month name viz. Jan or Dec or Feb.

vijay_iitkgp
Partner - Specialist
Partner - Specialist

Hi ,

Use =Month(addmonths(Today(),-1))&'-'&Right(Year(Today(),2))

Not applicable
Author

Hi Celambarasan, It still doesn't work.

I have the following values in the table:

Dec-11

Jan-12

Feb-12 etc.

In the search string, if i put Jan-12, selection works but when i use an expression like =month(date(addmonths(today(),-1))) it doesn't work.

BTW, this expression returns only the month name viz. Jan or Dec or Feb.

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     try with this expression

     =month(addmonths(today(),-1))&'-'&Date(addmonths(today(),-1),'YY')

Hope it helps

Celambarasan

Not applicable
Author

Thanks Celambarasan,

I have used the foll. expression. =Date(monthStart(date(addmonths(today(),-1))), 'MMM-YY')

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     It looks smarter way.

Celambarasan