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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Restrict listbox to view only two months

Hi,

I have a listbox that lists my dates as months .General tab > field...  given my month field here.

How should I frame a expression so I can just view max( month) and one prior month .???/

Labels (1)
6 Replies
Anil_Babu_Samineni
MVP
MVP

May be use

Match(month, 'jan', 'feb')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
tresB
Champion III
Champion III

Try like:

=Pick(Match(-1,Month=Max(total Month),Month=Max(total Month, 2)), Month, Month)

or

=If(Month=Max(total Month) OR Month=Max(total Month, 2), Month)

Chanty4u
MVP
MVP

try this

=aggr(only({<Month=  {'Jan','Feb'}>}Dim),Dim)

Not applicable
Author

Try this

MONTH_YEAR={">=$(=date(AddMonths(date((max(MONTH_YEAR)),'MM-YYYY'),-1),'MM-YYYY'))<=$(=date((max(MONTH_YEAR)),'MM-YYYY'))"}>}

sunny_talwar
MVP
MVP

Try this may be

If(Date >= Max(TOTAL MonthStart(Date), 2), Date)

effinty2112
Master
Master

Hi Nitya,

Try this as in expression in a listbox:

=Aggr(only({$<Date ={">=$(=Monthstart(max(Date),-1))"}>}Month),Month)

Make a New Sheet Object \ List Box ...

In Field scroll right down and select <Expression> then enter the above.

Good luck

Andrew