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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Sloane
Contributor II
Contributor II

Count of duplicate records as a new column in editor

Hi everyone, 

I have tried to find a solution to this but to no avail. I want to count the number of duplicated Ids and have this as a new column and then group by the distinct  ID in the qlik sense editor. Any help will be appreciated. 

 

Sloane_0-1683296466834.png

 

Labels (3)
1 Solution

Accepted Solutions
BrunPierre
Partner - Master II
Partner - Master II

Hi, omit the Name field to get the final table.

T1:
LOAD * Inline [
DepartmentID,Name
50,Jake
100,Tom
50,Miha
50,Ben
60,Cassie];

Left Join
LOAD DepartmentID,
Count(DepartmentID) as IDCount

Resident T1
Group By DepartmentID;

BrunPierre_1-1683303665041.png

View solution in original post

2 Replies
BrunPierre
Partner - Master II
Partner - Master II

Hi, omit the Name field to get the final table.

T1:
LOAD * Inline [
DepartmentID,Name
50,Jake
100,Tom
50,Miha
50,Ben
60,Cassie];

Left Join
LOAD DepartmentID,
Count(DepartmentID) as IDCount

Resident T1
Group By DepartmentID;

BrunPierre_1-1683303665041.png

Kushal_Chawda

@Sloane  you can count the department on resident load and keep that as separate table instead joining which links to actual table like below.

Data:
LOAD * Inline [
DepartmentID,Name
50,Jake
100,Tom
50,Miha
50,Ben
60,Cassie];

ID_count:
LOAD DepartmentID,
Count(DepartmentID) as IDCount
Resident Data
Group by DepartmentID;

 

If you now add DepartmentID and IDcount into table, you will have unique count of IDs