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: 
aheavy95
Creator
Creator

creating variable for earliest year

Hi all 

I am having a problem creating a new variable in my script.

I am trying to get the earliest sales_date year as a variable to use in the script for storing data by years.

aheavy95_2-1683639628260.png

First I loaded the minimal year-  year(min(Sale_Date))  and made sure I got the correct value in the sheet,

and then after going through examples online,  I tried to create the variable using 5 different ways but none of them worked as you can see in a screenshot from the debug:

aheavy95_3-1683639994702.png

 

how should I declare the variable that way I'll get that earliest year?

 

thanks

 

 

 

Up until now the variable vStartLoad was based of VStartDBAdjustment_Temp and the script worked fine.

Now I was asked to change it to the date I'm getting as the 'Value' - to the start of month of that date

So I created  VStartDBAdjustment_Temp and used it in vStartLoad   and when I run the code I'm getting this error at the vStartLoad  declaration.

 

aheavy95_1-1683639611164.png

 

Does anyone know what am I doing wrong?

thanks

 

 

Labels (4)
1 Solution

Accepted Solutions
aheavy95
Creator
Creator
Author

Solved it by doing:

Peek('field');

View solution in original post

1 Reply
aheavy95
Creator
Creator
Author

Solved it by doing:

Peek('field');