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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Default selection- Last 3 months

Following is the requirement  Default view should show last 3 completed months data. For example, if today’s date is 23-Oct then data of June ,July and Aug should be displayed as part of selection list box. Currently data is available for 9 months


Month-Year

May-13

Jun-13

Jul-13

Aug-13

Sep-13

Oct-13

Nov-13

Dec-13

Please suggest with an example..

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi,

I think the space in the month causing the issue, can you remove the space in month field and then use this expression

='(' & Date(Addmonths(Today(),-1),'MMMYY') & '|' & Date(Addmonths(Today(),-2),'MMMYY') & '|' & Date(Addmonths(Today(),-3),'MMMYY') & ')'

Regards,

Jagan.

View solution in original post

14 Replies
tresesco
MVP
MVP

Please take the pain of ceating an example so that people here can help you out faster.

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You could use set analysis like

     {<Date = {">=$(=AddMonths(Today(), -3))""}>}

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

I need to implement this as part of triggers as it should work with on open sheet

jagan
Partner - Champion III
Partner - Champion III

HI,

If you have a date field in you app then use this expression

=Sum({<DateDimensionName={'>=$(=MonthStart(Max(DateDimensionName), -3))<=$(=MonthEnd(Max(DateDimensionName), -1))'}, MonthDimensionName=, YearDimensionName=>} MeasureName)

OR

=Sum({<DateDimensionName={'>=$(=MonthStart(Today(), -3))<=$(=MonthEnd(Today(), -1))'}, MonthDimensionName=, YearDimensionName=>} MeasureName)

Hope this helps you.

Regards,

Jagan.

kiranmanoharrode
Creator III
Creator III

Dear Sravanthi,

Go to Settings---- Document Settings------- Triggers------ Document Event Triggers-----On Open------Edit Action-----

Add----Selection-----Select in field

(Repeat this 3 times to add 3 triggers)

Enter your TextMonth Field in Field input box without = (sign) for ex.  CommonMonth   values-(APR,MAY,JUN,JUL)

then  put below expression for search string input box with = (Sign)

for 1st trigger

=(Today()=MonthEnd(Today()),Date(Addmonths(Today(),-1),'MMM'),Date(Addmonths(Today(),-2),'MMM'))

for 2nd trigger

=(Today()=MonthEnd(Today()),Date(Addmonths(Today(),-1),'MMM'),Date(Addmonths(Today(),-3),'MMM'))

for 3rd Trigger

=(Today()=MonthEnd(Today()),Date(Addmonths(Today(),-1),'MMM'),Date(Addmonths(Today(),-4),'MMM'))

Save your document and reopen it.

Regards

Kiran Rode

+91 8976977897

Not applicable
Author

Hi Kiran,

3 rd trigger is replacing previous two triggers and only one month is selected....Requirement is to select all three months.....

jagan
Partner - Champion III
Partner - Champion III

Hi,

Instead of 3 triggers use on one trigger and use this expression

='(' & Date(Addmonths(Today(),-1),'MMM') & '|' & Date(Addmonths(Today(),-2),'MMM') & '|' & Date(Addmonths(Today(),-3),'MMM') & ')'


Regards,

Jagan.

Not applicable
Author

It did not work....

jagan
Partner - Champion III
Partner - Champion III

Hi,

Please find attached file hope it helps you.  If it not works then attach sample file.

Regards,

Jagan.