Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
sona_sa
Creator II
Creator II

Expression Code

Hi Team,

I have this Graph, Where I am representing month wise Salary. I want only month from April to March. But I have the data till September.

sona_sa_0-1620119070638.png

I have used this dimension - =If([Recruitment Year Month]<>'Jan 2021' and [Recruitment Year Month]<>'Feb 2021' and [Recruitment Year Month]<>'Mar 2021',[Recruitment Year Month]).

How I can increase till March 2022. If I do not have data for after Sep 2021.

Thanks.

1 Reply
Dalton_Ruer
Support
Support

So you want April 2021 until March 22? You could just say 

IF([Recruitment Year Month] >= 'Apr 2021' and [Recruitment Year Month]<='Mar 2022', [Recruitment Year Month])

There are times when those kind of expressions are absolutely necessary for 1 off scenarios. What I like more is to have that kind of expression in the Load Script so that you can set some kind of flag based on current dates. I'm guessing you want the dates to be rolling in some way, and if they are buried in calculated dimensions it's hard to remember to change those things.

There are always times when we try and brute force what we want into a chart just to see if it works. But I prefer quickly changing to embedding the code into the script so that we can be consistent in how we apply it and to ensure that it floats as we move forward in time.