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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using a variable in a set statement

 

Hi all,

I could really use some help with making a script dynamical so that i wouldnt have to change it each year.

I created a variable named: vCurrentYear that defines the year in which we currently live.

 

Now im trying to substitute the 2015 into the formula but when i try it stops working?

 

SET fClaims_Jan_CY =     

if(Conditiemutatie_Vanaf >= Date#('01-01-2015')     

        

  for example:

SET fClaims_Jan_CY =     

if(Conditiemutatie_Vanaf >= Date#('01-01-($(vCurrentYear))')   (Doesnt work)  

Labels (1)
1 Solution

Accepted Solutions
pokassov
Specialist
Specialist

Hi!

if(Conditiemutatie_Vanaf >= Date#('01-01-$(vCurrentYear)')

View solution in original post

2 Replies
pokassov
Specialist
Specialist

Hi!

if(Conditiemutatie_Vanaf >= Date#('01-01-$(vCurrentYear)')

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You don't need that variable actually:

SET fClaims_Jan_CY = InYear( Conditiemutatie_Vanaf , today());    


talk is cheap, supply exceeds demand