Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have a a variable in Load Script with below
Load
Min(CanonicalDate) AS MinDate,
Max(CanonicalDate) AS MaxDate
RESIDENT DateBridge;
let Month_year = Date(MonthStart(peek('MaxDate'),-1),'MMM-YY');
Now in frontend
'$(Month_year )' but this gives me Undefined in textbox,
How is to get Jul-16 as answer
Regards,
Hi Supriya,
Try this,
= '$(=Month_year)'
or simply
=Month_year
Remove $ in textbox .just use Month_year
Hi,
No i am not getting any value,its showing blank
Can you check if the variable is getting assigned a value in the script by adding a TRACE statement?
LOAD
Min(CanonicalDate) AS MinDate,
Max(CanonicalDate) AS MaxDate
RESIDENT DateBridge;
LET Month_year = Date(MonthStart(peek('MaxDate'),-1),'MMM-YY');
TRACE $(Month_year);
Also, check this: The Magic of Variables
If nothing works, share your app, someone can then help you.
HI,
Asusual, you always help me out with new ways of debugging. Thanks for Letting me know how to debug in qlik
i am not getting any value it showing blank .
So then, your next move should be to just check this:
LOAD
Min(CanonicalDate) AS MinDate,
Max(CanonicalDate) AS MaxDate
RESIDENT DateBridge;
LET Month_year = Date(MonthStart(peek('MaxDate'),-1),'MMM-YY');
LET vTest1 = Peek('MaxDate');
TRACE $(Month_year);
TRACE $(vTest);
No, for that also i am getting blank
This has caused a problem for me in the past, can you check this:
TableName:
LOAD
Min(CanonicalDate) AS MinDate,
Max(CanonicalDate) AS MaxDate
RESIDENT DateBridge;
LET Month_year = Date(MonthStart(peek('MaxDate'),-1),'MMM-YY');
LET vTest1 = Peek('MaxDate');
LET vTest2 = Peek('MaxDate', -1, 'TableName');
TRACE $(Month_year);
TRACE $(vTest1);
TRACE $(vTest2);