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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Using Variable's Value as Expression

Hello,

I am having a variable VTotalSales as Expression and plotting it with Month as Dim.

Problem is that it is displaying same value with diff diff month...

Am I missing something? What is the solution of it?

Regards,

Balraj Ahlawat

14 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

Remove = in the variable declaration.

Example:

=Sum(Sales)    --- Will give same value for all the months

Sum(Sales)    --- and now in expression you have to use $(variableName)

Hope this helps you.

Regards,

jagan.

Not applicable
Author

PFA for solution.

Anonymous
Not applicable
Author

Tresco,

If now, I need to calculate current year or previous year sales using set analysis and variable..

How can I do it?

=sum({<year={'2012'}>} $(VSales))

Will it work?

qlikmsg4u
Specialist
Specialist

=sum({<year={'2012'}>} sales))

Anonymous
Not applicable
Author

so through variable its not possible??