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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Different values between variables and formulas

I'm populating variables via a database, but when I use the variable in either a chart(pie chart) or a pivot table, the value the variable gives is the Total for the selection. If I put the formula is a cell by itself, it brings back the correct value, when it's places in a chart, it brings back the total. If I take the formula associated with the variable, and place the formula directly into the pivot table, it works correctly.

any idea why using the variable name would show the total when used in a chart or pivot table?

1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

in the expression you need to put $(variablename)

View solution in original post

4 Replies
lironbaram
Partner - Master III
Partner - Master III

when using formulas inside variables

you should note this behavior

if there is a '=' sign in the variable formula the variable will return the formula total result

if there isn't a 'Sign' then the variable formula will be calculated at each cell

Not applicable
Author

I figured that was the issue, but wether or not I put an "=" in the expression box, the total is returned. In my database, I use the "=". In QlikView expression, if I put VariableName I get the total, and if I put =VariableName I get the total

lironbaram
Partner - Master III
Partner - Master III

in the expression you need to put $(variablename)

Not applicable
Author

I removed the = from the database and made the expressions =$(variable) and it worked. Thanks for your help!