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

Question about selected and non selected values

dear community:

I'm having a problem with the selected and non selected values that I hope you can help me with:

I have the following tables

CapturaCarr.PNG

CapturaSemDur.PNG

I know that the green selection in the "X" table is a getfieldselection, where I can make decisions according to the value I'm comparing it with.

But right now, I have to set a variable according to the value that the "y" table is showing.

How can I do that?

Thank you very much

1 Solution

Accepted Solutions
swuehl
MVP
MVP

You can define your variable like

=Only( y )

or

=Concat(Distinct y ,', ')

or any other aggregation function that queries the values from y.

View solution in original post

6 Replies
sunny_talwar

What comparison are you making? Not really sure I understand your requirement

swuehl
MVP
MVP

You can define your variable like

=Only( y )

or

=Concat(Distinct y ,', ')

or any other aggregation function that queries the values from y.

Anonymous
Not applicable
Author

I want to set a variable between 0 and 1 if the field on the "y" table is 6 or 8.

I know that you can do a get field selection in some cases, but for the "Y" table I'm not selecting anything.

sunny_talwar

May be this:

If(SubStringCount(Concat(Distinct y, '|'), 6) = 1 or SubStringCount(Concat(Distinct y, '|'), 😎 = 1, 1, 0)

UPDATE: You can use Concat() to get the selections when you are not explicitly making a selection in a field

Anonymous
Not applicable
Author

Thanks!

swuehl
MVP
MVP

Maybe like

=If( Max({<y *= {6,8}>} y), 1,0)

edit: Missed the intersection op