Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have a situation where the years are not in 'continuity'. For example, in the input data: '1-Jan-1994', '31-Jul-1996', '14-Sep-1999'...etc. It shows that data for a few years are missing.
I need to create a listbox which spans from minimum year to the maximum with all those years that falls in between...for example, I need the output in the list box as: 1994..1995..1996...1997...1998...1999 (though there is no data for 1995, 1997 and 1998)
I have taken min and max of the year in the expression section of the list box...but I am not able to proceed further.
Thank you.
here for master calendar
http://community.qlik.com/blogs/qlikviewdesignblog/2012/10/16/the-master-calendar
or, just a small example
SET vMinDate = makedate(1994);
SET vMaxDate = makedate(1999,12,31);
calendar:
load
date($(vMinDate) + rowno() -1) as d,
month($(vMinDate) + rowno() -1) as m,
year($(vMinDate) + rowno() -1) as y
AutoGenerate
$(vMaxDate) - $(vMinDate) +1;
If you have Master Calendar in your data model,the years will be listed properly
here for master calendar
http://community.qlik.com/blogs/qlikviewdesignblog/2012/10/16/the-master-calendar
or, just a small example
SET vMinDate = makedate(1994);
SET vMaxDate = makedate(1999,12,31);
calendar:
load
date($(vMinDate) + rowno() -1) as d,
month($(vMinDate) + rowno() -1) as m,
year($(vMinDate) + rowno() -1) as y
AutoGenerate
$(vMaxDate) - $(vMinDate) +1;
Thank you!