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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can I set a variable to the result of a column in a table?

Lets say I have a straight table with an expression, and I have multiple rows. Lets say I have a country, and balance column. The balance column is an expression (rather complicated one), and I would like to set the variable vUSABalance to the value of the expression. In some cases, there might be more than one USA balance, so I would have to sum up. But I would like a vUSABalance, vUKBalance, vIndiaBalance. Is this possible?

4 Replies
Anonymous
Not applicable
Author

sample data set? if you are trying to assign just USA balance to this variable vUSABalance out of all other countries and their balances in the straight table you mentioned, then you need set analysis.

try assigning this formula for vUSABalance and see what happens when you show it in a text box -

=sum({<Country={'USA'}>} Balance)

similarly for other countries. the aggregate function (sum) will add up all the USA balances and give you the total. if this doesn't help, can you post your expression here?

Not applicable
Author

The problem is that the column I want summarized on is an expression, so when I refer to the column name, it comes up with Bad Field Name. All the columns I use from my load work fine, its just with the expressions. I am not sure how to set the value to 'this column in this table'

Anonymous
Not applicable
Author

hmmm...interesting.

pl check out this post to scramble sensitive information.

Preparing examples for Upload - Reduction and Data Scrambling

Not applicable
Author

I attached the qlikview report. Lets try starting with summing the Remaining Fees column by ID, Name, and Country. So aggregating up leaving out the currency.