Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
soniasweety
Valued Contributor III

Loop mapping

‌hi all ,

i have a data like below

fieldA ,FieldB,FieldC

Asia,South,ap

NA,dalas,texas

Asia,north,noida

     ,east,Kerala

     ,       , Chennai

so my requirement is like I need that output with new field status “in “and “out”

Logic is: if field A and FieldB nd FieldC  if all values hisrarchy is there it should show as in otherwise out

note: order of hierarchy checking from C—B—A ( means for fieldC the anyone of parent value not there the status is out or else in)

Output:

fieldA ,FieldB,FieldC,status

Asia,South,ap,in

NA,dalas,texas,in

Asia,north,noida,in

     ,east,Kerala ,out

     ,       , Chennai ,out

thnks

sony

1 Reply
vishsaggi
Esteemed Contributor III

Re: Loop mapping

Just write like

LOAD * , IF (Len(Trim(FieldA)) = 0 OR Len(Trim(FieldB)) = 0, 'Out', 'In') AS Status INLINE [

FieldA,FieldB,FieldC

Asia,South,ap

NA,dalas,texas

Asia,north,noida

     ,east,Kerala

     ,       , Chennai

];