Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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)  

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

You don't need that variable actually:

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


talk is cheap, supply exceeds demand