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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
annif
Partner - Contributor
Partner - Contributor

How to Evaluate a Variable Stored in a Field?

 

I have an inline table like this:

Menu: Load * Inline
[ %Selection, %expression
sum, vSumPark
count, vCountPark
avg, vAvgPark ];
 

Currently, the %Selection field contains only one selected value. I want to evaluate the corresponding %expression so that I get the value of the variable it references (for example, $(vSumPark)).

I tried using this expression in the Qlik expression editor, but it doesn't work:

 
= '$( ' & %expression & ' )'

 

Labels (3)
1 Solution

Accepted Solutions
Or
MVP
MVP

I'm not sure it's the cleanest way, but it works:

=$($(="[%expression]"))

 

View solution in original post

2 Replies
Or
MVP
MVP

I'm not sure it's the cleanest way, but it works:

=$($(="[%expression]"))

 

annif
Partner - Contributor
Partner - Contributor
Author

It worked, thank you! Regardaring the type..Thanks! Oops—fixed it now. Really appreciate it.