Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Pierre11
Contributor
Contributor

Load distinct based on based one column

How do I load this table:

Name Location City
A AJ ASD
B BH ERF
C CF HUY
A TY HFM
D GD HUJ
E YT OPL
F RY KJI
G PH MLF
I JK DNG
A TY HFM
B UI DGT

 

To get this: 

Name Location City
A AJ ASD
B BH ERF
C CF HUY
D GD HUJ
E YT OPL
F RY KJI
G PH MLF
I JK DNG

 

 

I do not want the name field to have duplicates.

 

 

Thank you.

 

 

 

 

Labels (1)
1 Solution

Accepted Solutions
BrunPierre
Partner - Master
Partner - Master

T:
LOAD Name,
Location,
City
FROM xyz;

NoConcatenate
LOAD Name,
FirstValue(Location) as Location,
FirstValue(City) as City


Resident T
Group By Name;

DROP Table T;

View solution in original post

2 Replies
BrunPierre
Partner - Master
Partner - Master

T:
LOAD Name,
Location,
City
FROM xyz;

NoConcatenate
LOAD Name,
FirstValue(Location) as Location,
FirstValue(City) as City


Resident T
Group By Name;

DROP Table T;

Kushal_Chawda

@Pierre11  if it is always first value then easiest way would be below instead applying complex grouping

Data:
LOAD
Name,
Location,
City
FROM Source
where not Exists(Name);