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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Oggy172
Creator II
Creator II

Variable in Load Script not being set

Hi all,

 

I've been continuing my Qlik journey, my actual training isnt until next week, but I've been making some progress.

I'm having an issue in that my variable isn't being set (Let) within the load script.

It is declared in the variable list (Edit Sheet, variables) as per the below.

Oggy172_0-1731494589181.png

 

However, when my load script runs, nothing is set to this variable.

Neither of the two Let statements work....

 

 

 

CalendarToday:
LOAD distinct FiscalWeek	as ThisWeek,
Sequence -1 as LastWeek
FROM [lib://QVD Data:Office_365_Sharepoint - a@b.com/Shared Documents/QlikSaaS/Calendar2.qvd]
(qvd) where Date=today();

let v_DefaultWk = Max('ThisWeek');
let v_DefaultWk = FieldValue('ThisWeek',1);

 

 

 

If I define the variable in the UI (outside of the load editor)

Oggy172_1-1731494818917.png

I've also tried the fully qualified fieldname 

 

let v_DefaultWk = Max('CalendarToday.ThisWeek');

 

Labels (1)
1 Solution

Accepted Solutions
Oggy172
Creator II
Creator II
Author

The one syntax I didn't try worked!

let v_DefaultWk = FieldValue('CalendarToday.ThisWeek',1);

View solution in original post

1 Reply
Oggy172
Creator II
Creator II
Author

The one syntax I didn't try worked!

let v_DefaultWk = FieldValue('CalendarToday.ThisWeek',1);