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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
melissapluke
Partner - Creator
Partner - Creator

Variables within another Variable

Hi all,

I have a drop down variable selector in which a user can select from a list and assign a value to vPCType1. I have 10 of these variable selection options.

Next, I have a variable called vPCTypeMatch which is put into a table and looks through those 10 options to determine which, if any, a row in the table matches.

Pick(Match([Procedure Type],vPCType1,vPCType2,vPCType3,vPCType5,vPCType5,vPCType6,vPCType7,vPCType8,vPCType9,vPCType10)+1,

'N/A',1,2,3,4,5,6,7,8,9,10)

This is working just fine.

question1.png

Next, I want to create another variable  called vPCSubtype using that vPCTypeMatch. So if vPCTypeMatch=1, then my variable I am using should be vPCSubtype1. If vPCTypeMatch=2, then my variable I want to use is vPCSubtype2. I can get that to work, but I cannot get it to calculate.

question1.png

If I use =$(='vPCSubtype'&$(vPCTypeMatch)), it will work when a single row is selected, but not if there are multiple rows.

One Row:

question1.png

Multiple Rows:

question1.png

Any ideas on what I am doing wrong or a better approach to this?

Thanks,

Melissa

0 Replies