Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Carlaf_93
Creator II
Creator II

load script

Good evening,

 

i have a table like this:

load * inline[

name,value,

pippo,50,

pippo,50,

tom,70];

i would like to create a new field that gives me yes if i have the same name ore than a time.

something like this:

yes,pippo,50,

yes,pippo,50,

no, tom,70]

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Names:
LOAD * inline[

name,value,
pippo,50,
pippo,50,
tom,70]
;
Left Join(Names)
LOAD
  name,
  if(NameCount > 1, 'yes', 'no') as HasDuplicate
;
LOAD
  name,
  Count(name) as NameCount
Resident Names
Group by name
; 

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

View solution in original post

1 Reply
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Names:
LOAD * inline[

name,value,
pippo,50,
pippo,50,
tom,70]
;
Left Join(Names)
LOAD
  name,
  if(NameCount > 1, 'yes', 'no') as HasDuplicate
;
LOAD
  name,
  Count(name) as NameCount
Resident Names
Group by name
; 

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com