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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

the issue about excluded values

Hi,

I need to set the following condition:

if value 'A' in field 'B' is possible to select, then Test=1, else Test=0.

Is it possible to set such an expression in QlikView?

Thank you in advance,

Larisa

Labels (1)
1 Solution

Accepted Solutions
johanlindell
Partner - Creator II
Partner - Creator II

Providing you don't have too much data you can "Concat" the field B and look for "A" in that string. You need to add a "divider" character.

Formula for Test variable:

=If (Index ('|' & Concat (DISTINCT B, '|') & '|', '|A|'), 1, 0)

View solution in original post

5 Replies
antoniotiman
Master III
Master III

In script

Load

If(B='A',1,0) as Test

Anonymous
Not applicable
Author

Maybe I explained not clear enogh.

I mean if value 'A' in field 'B' is possible to select taking into account other selections at a particular moment, then Test=1, else Test=0.

I see that loading another field won't help.

johanlindell
Partner - Creator II
Partner - Creator II

Providing you don't have too much data you can "Concat" the field B and look for "A" in that string. You need to add a "divider" character.

Formula for Test variable:

=If (Index ('|' & Concat (DISTINCT B, '|') & '|', '|A|'), 1, 0)

antoniotiman
Master III
Master III

Maybe Expression

If(B='A',Sum({<Test={1}>} Value),Sum({<Test={0}>} Value)

Anonymous
Not applicable
Author

It works. Thank you!