Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $400 before Dec 31st: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
ext_bay
Employee
Employee

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 ?

ext_bay
Employee
Employee
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))

ext_bay
Employee
Employee
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

ext_bay
Employee
Employee
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

ext_bay
Employee
Employee
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 .