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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
iluilyas
Contributor III
Contributor III

Applying Year Filter

Hi

I am trying to apply the year filter to the column in the left but unfortunately i'm not getting any results. (Its zero)

Below is the set analysis string im applying:

sum({1<DATE(MNDATE,'YYYY')={'$(vRepYrCrnt)'}>} ENDTOT)

MNDATE has starting dates of each month, like (20160101.... 20161201) and my variable vRepYrCrnt=2016

Your help will be much appreciated.

Regards

Ilyas

1 Solution

Accepted Solutions
sunny_talwar

Create a year field in the script:

LOAD MNDATE,

           Year(MNDATE) as Year

           ...

FROM ...;

and then this

Sum({1<Year={$(=vRepYrCrnt)}>} ENDTOT)

View solution in original post

2 Replies
sunny_talwar

Create a year field in the script:

LOAD MNDATE,

           Year(MNDATE) as Year

           ...

FROM ...;

and then this

Sum({1<Year={$(=vRepYrCrnt)}>} ENDTOT)

iluilyas
Contributor III
Contributor III
Author

Huh... why this didn't strike to me? Yeah this is the way ahead and it works! Thanks Sunny!