Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

philmywallet
New Contributor III

Search fields, Create Flag

Hi

I have a list of 5 fields which contain lapse times.  These are loaded as part of the load script.  My report has a table which averages the lapse times as an expression.  I have created an error code 999 to identify some specific issues with the lapse times fields.

What I need to do is create a table which looks at any of the lapse times fields and shows a flag to identify if any of the fields have code 999.

Can anyone help me do this?

Dimension:

CustomerRef,

JobRef

Expression:

Lapse_A

Lapse_B

Lapse_C

Lapse_D

Lapse_E

If any of the Lapse fields in my table contain '999', then flag for the customer ref

Any thoughts?

Cheers

Phil

Tags (3)
1 Solution

Accepted Solutions
mwoolf
Honored Contributor II

Re: Search fields, Create Flag

=if(Lapse_A='999' or Lapse_B='999' or

     Lapse_C='999' or Lapse_D='999' or Lapse_E='999',

          1,0) as Flag,

4 Replies
mwoolf
Honored Contributor II

Re: Search fields, Create Flag

=if(Lapse_A='999' or Lapse_B='999' or

     Lapse_C='999' or Lapse_D='999' or Lapse_E='999',

          1,0) as Flag,

Re: Search fields, Create Flag

Or This?

=if(Lapse_A='999', If(Lapse_B='999', If(Lapse_C='999', If(Lapse_D='999', If(Lapse_E='999',1,0))))) as Flag,

el_aprendiz111
Valued Contributor

Re: Search fields, Create Flag

Hi,

IF(RangeSum(Lapse_A,Lapse_B,Lapse_C,Lapse_D,Lapse_E)=999*5,1,0) AS FLAG;

philmywallet
New Contributor III

Re: Search fields, Create Flag

Sorted.  I thought there might be an easier way.  Cheers   Phil

Community Browser