Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Simple variable expansion

It seems the simplest of things are the hardest.  I have set a variable in the load script

LET AsOf='3/3/2012';

All I want to do is show a text box on the main sheet with the value of that variable.  I make a text box, click the ellipses in the Text box on the General tab to get the Edit Expression window, and then click the variables tab.  It shows my only variable AsOf in the listbox, and the value below shows 3/3/2012.  I place

=$(AsOf)


in the expression.

The text object shows the value 0.0004970789264414

=Date($(AsOf)) shows 12/30/1899.  Format codes seem to be irrelevant.

Please help - this shouldn't be this difficult!

1 Solution

Accepted Solutions
Not applicable
Author

I was trying too hard. 

=AsOf

and

=vAsOf

both return what I want.  I'm going home now..........

View solution in original post

3 Replies
Not applicable
Author

Sorry, folks.

This is a LET vs SET issue.  Using SET will give me the correct string.  Using LET gives me 3 divided by 3 divided by 2012.

Been a long day....

Not applicable
Author

Actually, this is not the correct answer.  I now have two variable in the script:

LET AsOf='3/3/2012';

SET vAsOf='3/3/2012';

Both of these behave the same way.  I guess I really don't understand this right now....

Not applicable
Author

I was trying too hard. 

=AsOf

and

=vAsOf

both return what I want.  I'm going home now..........