Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Livia_Carrarini
Partner - Contributor
Partner - Contributor

Field with Variables Names

Good morning, 
I'm dealing with the following problem. I have a field containing variables names (VariableName) associated 1to1 to another one (here VariableNumber):

Livia_Carrarini_0-1698918120233.png

I have created three variables:

Livia_Carrarini_1-1698918251559.png

And I'd like to be able to expand the variables in correspondence to the VariableNumber used as a dimension in a table. Precisely, I'd like the output:

Livia_Carrarini_2-1698918421854.png

I tried many syntax, like these:

Livia_Carrarini_3-1698918473534.png

but nothing seems to work, and I wonder if it's actually doable. 

Thanks in advance!

 

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Variable resolution is done before expression evaluation, so you cannot resolve to a different variable name row by row. What you can do is reference all the potential variables and use if() logic to select the correct value for each row. For example, like this:

Pick(Match(VariableName, 'var1', 'var2', 'var3'), '$(var1)', '$(var2)', '$(var3)')

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

View solution in original post

3 Replies
marcus_sommer

In regard what you are showing you could simply add the vVariableLongName as another field within the inline-load or keeping the information within an associated table. But I assume that's not the goal behind your question ... 

Mark_Little
Luminary
Luminary

I am assuming you are trying to show the contents for the variable?

 

Have you tried $("only(VaraibleName)")

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Variable resolution is done before expression evaluation, so you cannot resolve to a different variable name row by row. What you can do is reference all the potential variables and use if() logic to select the correct value for each row. For example, like this:

Pick(Match(VariableName, 'var1', 'var2', 'var3'), '$(var1)', '$(var2)', '$(var3)')

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com