Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
chaitanyajami
Partner - Creator
Partner - Creator

Selection of year and month

Hi all,

i have filed Year and month in list box objects and if user selects year as 2014,2015 month should be shown as only December and if user selects current year then is must show all month from jan to jun 2016, how to achieve it thank in advance

1 Reply
MK_QSL
MVP
MVP

You need to create Trigger on Year Field.

Go to

Settings - Document Properties - Trigger - Field Event Trigger - YearField - Add Actions for On Select and On change

Select In Field

Month

Search String

=IF(GetSelectedCount(Year) <> 1, '', If(Max(Year) = Year(Today()), Month(MakeDate(Max(Year),Max({<Year = {"$(=Max(Year))"}>}Month))),'(' & Concat({<Month>} DISTINCT Month, ' | ', Month) & ')'))

Check enclosed sample document...!

Or use below as a Search String

=IF(GetSelectedCount(Year) <> 1, '', If(Max(Year) <> Year(Today()), Month(MakeDate(Max({<Month>}Year),Max({<Month=,Year = {"$(=Max(Year))"}>}Month))),'(' & Concat({<Month>} DISTINCT Month, ' | ', Month) & ')'))