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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
manoranjan_d
Specialist
Specialist

List box

Hi

in my list box there is lot of year

example 2012 to 2016

now in my list i need the current year and previous year only

how we can achieve it?

and then coming to the chart


dimension which have

if(date#(date(DT,'YYYY'))=Year(today()),date#(date(DT,'MMM')))

expression have count and amt

according  to the year selection in list box it shd show the all the months available to the year

how can we achieve it?

3 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

The years may be ok but the base date from which the year is lifted probably still contains the full date. When creating the Year field, use somthing like Year(YearStart(Date)) and you'll only get one of each in your listbox.

Best,

Peter

sunny_talwar

May be for list box try this:

If(Year >= Year(Today()) - 1, Year)

In your chart you just need Max year's month? May be this:

MonthYear(DT)

Add this to your expression:

{<DT = {"$(='>=' & Date(YearStart(Max(DT)), 'DateFieldFormatHere') & '<=' & Date(Max(DT), 'DateFieldFormatHere'))"}>}

manoranjan_d
Specialist
Specialist
Author

No in my chart if the user select the 2015 year then it should show months available to the 2015 or 2016 means it should show according month for 2016 available