Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
iluilyas
New 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

Re: Applying Year Filter

Create a year field in the script:

LOAD MNDATE,

           Year(MNDATE) as Year

           ...

FROM ...;

and then this

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

2 Replies

Re: Applying Year Filter

Create a year field in the script:

LOAD MNDATE,

           Year(MNDATE) as Year

           ...

FROM ...;

and then this

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

iluilyas
New Contributor III

Re: Applying Year Filter

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