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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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
MVP
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
MVP
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