Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor II
Contributor II

Extract years from date and use it in the filtter

I have  dates attributes in excel sheets from 1483 to 2019  with the below format

2019-06--23 00:00:00.0000000.I want to filter my page using only years how can
I do that ?

Labels (1)
4 Replies
Highlighted
Master
Master

Hi @F1992 

normally this script will help you :

Year(Date#([Your_Date], 'YYYY-MM-DD hh:mm:ss.0000000')) as Year

 

if this is not the case share here an example of your input data and what you want as output

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Highlighted
Contributor II
Contributor II

Here are my dates sample I want to show  1438,2000,2001......until 2019 in the filter

 
 
Highlighted
Master
Master

can share your sample data in usable format: Excel,csv,...

the expected output is a list like this is

Capture.PNG

or do you want to concatenate years like that :1438,2000,2001 ?

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Highlighted

Try this?

Load Year(Date#(Left(Field, 4))) as Year, Field From Table;

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)