Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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..

14 Replies
Not applicable
Author

Attached example....On Open following month should b selected in this case Dec 13,Nov 13, Oct 13

jagan
Luminary Alumni
Luminary Alumni

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.

tresesco
MVP
MVP

Try this:

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

Note: space is handled using double quotes- chr(34)

jagan
Luminary Alumni
Luminary Alumni

Hi,

Great.  Tried with single quote and [ but missed double quotes.

Regards,

Jagan.

Not applicable
Author

Thanks Jagan