Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

franciscoacunac
New Contributor III

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

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: Question about selected and non selected values

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

Re: Question about selected and non selected values

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

MVP
MVP

Re: Question about selected and non selected values

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

Highlighted
franciscoacunac
New Contributor III

Re: Question about selected and non selected values

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.

Re: Question about selected and non selected values

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

franciscoacunac
New Contributor III

Re: Question about selected and non selected values

Thanks!

MVP
MVP

Re: Question about selected and non selected values

Maybe like

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

edit: Missed the intersection op