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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
teetoes
Contributor
Contributor

Create Field for Year Selection

Hello,

 

I am trying to create a field for users to select a single year to view data specific only to that calendar year (It would be from Jan 1 - Dec 31 of the prior year). But I just want it to show like "2018" in the box or dropdown. I also need it to add years, so next year 2022 would be available. I can't seem to find how to do this with variables.

Thanks in advance for any assistance!

Labels (2)
3 Replies
hic
Former Employee
Former Employee

All you need is a 

Year(Date) as Year,

in the script.

The best way is to create a master calendar or use the auto calendar in Qlik Sense.

teetoes
Contributor
Contributor
Author

Where would I add this in the script? I already have my sql with a field for the Year which is loaded as a field. I'm not sure where to go from here.

hic
Former Employee
Former Employee

If you already have a field "Year" that is linked to the data, then I don't understand your question...

You write that you want a field that allows "users to select a single year to view data specific only to that calendar year". The loaded field "Year" will do exactly that.