Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Not applicable



I have transformt a date value into a year value in Qlik Sense -> year(floor(date.value)) in a listbox. Now, when I click on the year value in the listbox, Qlik Sense give me back the selected value with year(floor(date.value)). Is there a possibilty to make this Year? Outside the script directly into the front end?

Thank you...

3 Replies

Re: Discription

Create Year in Script...



     Year(date.value) as Year

From Table...

Or use

Year(date.value) as list box (using expression)


Re: Discription

As Manish's sample show you won't need Floor() function here. Floor is needed when converting from TimeStamp Field to Date Field. For extracting just Year (or month or day) you would just need to wrap is around with Year() (or Month() or Day()) functions.

the only thing to make sure is that QV reads your date as true date (and not as a string). If for some reason it isn't read as a date you can use Date#() function to help it understand that it is actually a date. (Why don’t my dates work?)

Honored Contributor II

Re: Discription

Hi Hans,

Make use of the year(date) function to create a year field. There are umpteen number of date functions which would be of great help in Qlik check this document for more information:

Creating A Master Calendar