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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
manozpph
Creator
Creator

What is the difference between using “=” before a variable and when it is not used?

Hey Guys Can Some body Let me know the Answer for this Question.

What is the difference between using “=” before a variable and when it is not used?

Thanks In Advance!

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi,

Giving = in variable will evaluate the expression and stores the result in variable, if we do not give = then the expression is stored as string.

For example:

vSales : =Sum(Sales) - then Total sales is calculated (Assume total sales is 1 Million)

vSalesExpression : Sum(Sales) - this will store Sum(Sales) as string

Now in a chart if you have a dimension Customer and use the above expression

=$(vSales) - for all the customers you will the same sales amount 1 Million, since it is already evaluated.

=$(vSalesExpression ) - will calculate the sales for each customer, $(vSalesExpression ) will simply put Sum(Sales).

Hope this helps you.

Regards,

Jagan.

View solution in original post

3 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

Giving = in variable will evaluate the expression and stores the result in variable, if we do not give = then the expression is stored as string.

For example:

vSales : =Sum(Sales) - then Total sales is calculated (Assume total sales is 1 Million)

vSalesExpression : Sum(Sales) - this will store Sum(Sales) as string

Now in a chart if you have a dimension Customer and use the above expression

=$(vSales) - for all the customers you will the same sales amount 1 Million, since it is already evaluated.

=$(vSalesExpression ) - will calculate the sales for each customer, $(vSalesExpression ) will simply put Sum(Sales).

Hope this helps you.

Regards,

Jagan.

jagan
Partner - Champion III
Partner - Champion III

manozpph
Creator
Creator
Author

I have gotten the Answer.

Thank you so much for your help.