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

single quotes in variable

Hi all,

Can any one tell me when to use single quotes in set analysis with variable and when not to use them?

Regards

Manu

3 Replies
Chanty4u
MVP
MVP

shiveshsingh
Master
Master

Single quotes - looking for a direct value like hardcoded..

Double quotes - Search for a string value, may be you can look over the link provided by Chanty

boorgura
Specialist
Specialist

Whenever the variable is used within $(), it forces to evaluate the variable. However, if the variable already has stored an evaluated value.

For instance, if the variable vDate is defined as =date(today()).

That means vDate has a value 04/02/2018

If you use '$(vDate)' --> it results in '04/02/2018'

whereas if you use $(vDate) --> it will try to evaluate 04/02/2018 as a mathematical expression (here - division).

Hope that explains!