Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

priyanshi
New Contributor

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?

4 Replies
balrajahlawat
Esteemed Contributor

Re: difference between #(hash) and $(dollar)

balrajahlawat
Esteemed Contributor

Re: difference between #(hash) and $(dollar)

$(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

reddys310
Honored Contributor II

Re: difference between #(hash) and $(dollar)

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

MVP
MVP

Re: difference between #(hash) and $(dollar)

'#' 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