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: 
Not applicable

Choosing associated value based on selection?

Hi,

I'm trying to have a variable set to a certain value based on the value inputted into a input box

I have a table with two columns, and every value is unique

LetterNumber
A1
B2
C3
D4

How do i go about having a variable that will be set to "1" when "A" is entered into the input box

Thanks

Labels (1)
1 Reply
swuehl
Champion III
Champion III

Assume you've got variable vInput with value 'A':

=Only( {<Letter = {'$(vInput)'}>} Number)

edit: use this as definition of your other variable (Including the leading equal sign)