Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Vijen_M
Contributor III
Contributor III

Hi i have an inline data where i have duplicate data and i want to remove duplicate data in data model how should i do that

Name, Sales
A, 1000
B, 2000
C, 3000
D, 4000
C, 3000
C, 3000
D, 4000    Screenshot 2023-01-10 193620.png

 

but i want that in data model it should show only unique value 

Name   Sales

A,  1000

B,  2000

C,3000

D,4000

Labels (2)
3 Replies
SerhanKaraer
Creator III
Creator III

Hello Vijen,

Distinct prefix does exactly what you want.

LOAD DISTINCT Name, Sales INLINE [
Name, Sales
A,1000
A,1000
B,2000
C,3000
D,4000
];

 I hope it solves your problem.

Vijen_M
Contributor III
Contributor III
Author

@SerhanKaraer  thanks for that but is there another way of doing that ?

SerhanKaraer
Creator III
Creator III

Hi,

There are 2 other ways:

LOAD Name, Sales;
LOAD Name, Sales, Count(1) as DummyMeasure GROUP BY Name, Sales;
LOAD * INLINE [
Name, Sales
A,1000
A,1000
B,2000
C,3000
D,4000
];
LOAD Name, Sales WHERE Id = 1;
LOAD Name, Sales, AutoNumber(RecNo(), Name & '|' & Sales) as Id;
LOAD * INLINE [
Name, Sales
A,1000
A,1000
B,2000
C,3000
D,4000
];