Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to handle dual datatype of MonthName() while selecting with trigger?

When I tried to select the Date using OnOpen action in trigger with

='(' &date(AddMonths(max({1}Month),-2)) & '|' & date(AddMonths(max({1}Month),-1)) & '|' &date(max({1}Month)) & ')'

it worked fine but when I try to select Months with

='(' &Text(MonthName(date(AddMonths(max({1}Month),-2)))) & '|' & Text(MonthName(date(AddMonths(max({1}Month),-1)))) & '|' & text(MonthName(date(max({1}Month)))) & ')'


='(' &MonthName(date(AddMonths(max({1}Month),-2))) & '|' & MonthName(date(AddMonths(max({1}Month),-1))) & '|' & MonthName(date(max({1}Month))) & ')'

both didn't work.

Please refer attached qvw for reference.

2 Replies
Not applicable

Hi Ganesh,

You are facing this issue because with dual, Qlik is not able to understand your trigger.

Find attached qvw for your solution .


I have stopped liking MonthName function and have started using Date() function like this

Date(MonthStart(Month), 'MMM YYYY') as MonthST,

It essentially gives you the same format, but makes you life so much more easier for using set analysis and triggers. Once you have made the above changes, this should work

='>=' & Date(AddMonths(Max({1}Month),-2), 'MMM YYYY') & '<=' & Date(Max({1}Month), 'MMM YYYY')