Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Associated Column selections?

Example:

Load * Inline [

Col1, Col2

1, One

2, Two

3, Three

4, Four

]

I want to get the value of the "Col1", if i select a value (One, Two) in the list box "Col2".

=GetFieldSelections(Col2)  returns the One, if i select "One" in the list box.

How can i get the value 1 from "Col1", if select "One" in the Col2 list box.

Regards

Siva

1 Solution

Accepted Solutions
Not applicable
Author

find the attachement.

View solution in original post

8 Replies
Not applicable
Author

Please find the attachment it may help you

Not applicable
Author

Thanks niranjan for quick reply.

I want to get an associated value as a output.

if i select "Two", the output should be 2

if i select "Three", the output should be 3

etc.

Your example is giving the count of multiple selections on filed "Col2". This is the helpful answer, but no relation to my requirement.

Is there any way to get the associated column values based on the selections made on one column?

Regards

Siva

Not applicable
Author

In my example if you select "Onë" value in col2 filed, 1 value in col1 field will get select.

And you are asking the output,

the value should be displayed in text box or something else

Can explain briefly  what should happen after selecting the value "two".

Niranjan

Not applicable
Author

Hi Niranjan,

My requirement is:

If i select value of the Col2 as "Two", The value should be displayed in the text box is 2.

If is select value of Col2 as "Four", The valud should be displayed in the text box is 4

etc...

I hope this helps you to understand my requirement.

In your previous example, The value in text box is 1, if i select any one the values in Col2.

The value in text box is 2, if i selected Two values in col2(for ex: Two & Four  ( Or) Three & One).

According to your question in previous post, The value of the text box is 1, if select value "Two" in the Col2 list box.

Regards

Siva

Not applicable
Author

Further to discuss

The value of the text box should get it from Col1, as per selections made on Col2.

Not applicable
Author

Hi,

Use this expression in text box previous example.

=Dual(Col1,Col2)

Niranjan M

Not applicable
Author

find the attachement.

Not applicable
Author

Excellent.

Thanks a lot for all your help. Its working now.

Now using your approach, iam working on the real time scenario.

Can i use the dual function in set analysis?

Regards

Siva