Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

difference between #(hash) and $(dollar)

Hi,

Could anyone please explain me the difference between # and $ sign before variables and when we use quotes('') with dollar and hash?

For eg: I have an inline fuction

i have min date as vmin=11/11/2013;

load * inline[

no, date

1,11/11/2013

2,10/11/2013

3,12/10/2013

]

where $(min)>'$(#date)'

i m not getting the values if i dont use # .

can anyone please help?

5 Replies
Anonymous
Not applicable
Author

$(Dollar) is nothing but its your $ Expansion, see already shared posting with you.

#(Hash), it might be put before your fieldname but never heard anything like putting # sign before a field

reddy-s
Master II
Master II

Hi Priyanshi,

You use quotes basically when you need a variables as a string. in your example, if you never used quotes for $(#date) it would not be treated as a string. it would just be a date like this: 2015/12/28 , but when you use quotes (' ') , it is converted to a string like this:'2015/12/28'

$ is used to evaluate the expression in the variable :

Check these articles for deeper insights on $ expansion:

The Magic of Variables

The Magic of Dollar Expansions

tresesco
MVP
MVP

'#' before a variable is used (I have not seen much of use cases) if the variable is meant to be evaluated as numeric value. For dollar ($) you have got references to be followed above, the single line highlight here could be

a dollar expansion is something that is done before the expression (or statement) is evaluated.

Single quotes are used when we compare strings. For better understanding and knowledge, read: QlikView Quoteology

ValeriyaBartosh
Partner - Contributor III
Partner - Contributor III


'#' before a variable is used (I have not seen much of use cases) if the variable is meant to be evaluated as numeric value.


Could you please provide any examples?