Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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)
In script
Load
If(B='A',1,0) as Test
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.
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)
Maybe Expression
If(B='A',Sum({<Test={1}>} Value),Sum({<Test={0}>} Value)
It works. Thank you!