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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How does the '$' work. for eg: $(vTodaysDate) ???

Thanks in advance...

Labels (1)
1 Solution

Accepted Solutions
suniljain
Master
Master

When using a variable for text replacement in the script or in an expression, the syntax

$( variablename )     

is used. $(variablename) expands to the value in variablename. If variablename does not exist the expansion will be the empty string.

For numeric variable expansions, the syntax

$( variablename )     

is used. $( variablename ) always yields a legal decimal-point reflection of the numeric value of variablename, possibly with exponential notation (for very large/small numbers). If variablename does not exist or does not contain a numeric value, it will be expanded to 0 instead.

Example:

After execution of the following script:

SET DecimalSep=',';

LET X = 7/2;

$(X ) will expand to 3,5 while $(#X ) will expand to 3.5.

Examples:

set Mypath=C:\MyDocs\Files\

...

load * from $(MyPath)abc.csv;

set CurrentYear=1992;

...

select * from table1 where Year=$(CurrentYear);

View solution in original post

2 Replies
suniljain
Master
Master

When using a variable for text replacement in the script or in an expression, the syntax

$( variablename )     

is used. $(variablename) expands to the value in variablename. If variablename does not exist the expansion will be the empty string.

For numeric variable expansions, the syntax

$( variablename )     

is used. $( variablename ) always yields a legal decimal-point reflection of the numeric value of variablename, possibly with exponential notation (for very large/small numbers). If variablename does not exist or does not contain a numeric value, it will be expanded to 0 instead.

Example:

After execution of the following script:

SET DecimalSep=',';

LET X = 7/2;

$(X ) will expand to 3,5 while $(#X ) will expand to 3.5.

Examples:

set Mypath=C:\MyDocs\Files\

...

load * from $(MyPath)abc.csv;

set CurrentYear=1992;

...

select * from table1 where Year=$(CurrentYear);

Not applicable
Author


Thank you.....