Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
ca386807
Contributor II
Contributor II

Qlik Sense - Filter pane - 10 years of dates to filter on

I have a date field being used in a filter pane.  The format is YYYYMM.  Currently, the field contains dates from 194701 to 204601, but I need to limit those values to  whatever the current date is and back 10 years only.

For example, if todays date is 202302, then I need the values in the date field to only show 10 years worth of dates.  In this case, 201302 - 202302. A rolling 10 year span.

 

I've tried putting the conditions in the where clause of my query, such as:

WHERE YEAR(LEFT(YR_MO_NR, 4))  >= (YEAR(CURRENT_DATE) - 10)  AND  YEAR(LEFT(YR_MO_NR, 4)) < = YEAR(CURRENT_DATE)

 

No luck.

 

Any ideas?

 

 

Labels (1)
0 Replies