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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to distinct load a table on multiple fields

Hi,

I have a table (lets call it TableA) that looks like this:

ColA     ColB     ColC

Red         1             A

Red         1             A

Red         1             A

Blue         2            B

Blue         2            B

Black       3            C

Black       3            D

Black       1            D

What I want to do is to get rid of duplicated rows, so to say I want to load this table or convert it into a new table distinct on all three columns so the result ends up like this:

ColA     ColB     ColC

Red         1             A

Blue         2            B

Black       3            C

Black       3            D

Black       1            D

How do I do this?

BR

1 Solution

Accepted Solutions
alexandros17
Partner - Champion III
Partner - Champion III

LOAD

Distinct * inline
[

ColA ,    ColB,     ColC

Red     ,    1    ,        A

Red    ,     1     ,        A

Red   ,      1     ,        A

Blue  ,       2     ,       B

Blue ,        2     ,       B

Black   ,    3     ,       C

Black  ,     3     ,       D

Black   ,    1    ,        D

]
;

Use "DISTINCT" Keyword

View solution in original post

2 Replies
shree909
Partner - Specialist II
Partner - Specialist II

try this

load

distinct(ColA )

distinct(   ColB   )

distinct(  ColC)

from table ...

alexandros17
Partner - Champion III
Partner - Champion III

LOAD

Distinct * inline
[

ColA ,    ColB,     ColC

Red     ,    1    ,        A

Red    ,     1     ,        A

Red   ,      1     ,        A

Blue  ,       2     ,       B

Blue ,        2     ,       B

Black   ,    3     ,       C

Black  ,     3     ,       D

Black   ,    1    ,        D

]
;

Use "DISTINCT" Keyword