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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Get field value from corresponding record but different value

Hi,

So I have below table for example:

AB
Tim8
John9
Mark4

In my Dashboard in Qlik Sense I have a climber selection tool in which the user has the option to select a name (only one selection is possible). So if for Example the user chooses 'Tim", I want to return '8'. How can I write the code to put this in a variable?

Thanks!

9 Replies
arulsettu
Master III
Master III

how do you want to show this '8'   in texbox ?

Anonymous
Not applicable
Author

For example, yes. In practice I have a column that I want to multiply with the value in column B, based on the selection that is made.

OmarBenSalem

in this column; to control the unique selection of columnA:

if(GetSelectedCount(ColA)<>1,'Please select only one ColA', sum(YourColumn) * sum(colB))

Anonymous
Not applicable
Author

Thanks for you response! However, the selection is not made in column A but in another object which is similar to a list box (with only one selection), but this is not available in Qlik Sense.

OmarBenSalem

Not a problem; with ColA, I meant the field that is in column A: let's name it fieldA:

and the expression will work

Anonymous
Not applicable
Author

Ah I see, Yes that would be an option, except I am using a selection tool as  in the attachment, so the user will actually only be allowed to make one selection.

Example.PNG

OmarBenSalem

Yes I get it, It's just to control what's shown when there is no selection for example..

Capture.PNG

Capture.PNG

the expression is :

if(GetSelectedCount(Customer)<>1,'Please select only one customer', sum(Sales) * sum(Cost))

Capture.PNG

Anonymous
Not applicable
Author

This only works if I use a field option instead of a variable, but I will do for know. Thanks for you help!

darrell_tobin
Creator
Creator

Hi Stijn,

In this case the easiest thing is to create table in excel with values, load it into your app then you can select the fields .