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: 
rishikeshtiwari
Creator
Creator

Need Only Duplicate Rows

Hi All,

I have a table having some duplicate rows. I have a requirement that I need only the duplicate rows of the table.

Please find the attached excel with result.

Thanks

Rishi

2 Replies
sunny_talwar

Try this:

Table:

LOAD Key,

     EmployeeId,

     EmpName,

     EmpSalary,

     DateofJoin,

     City

FROM

Employee.xlsx

(ooxml, embedded labels, table is Employee);

Right Join (Table)

LOAD Key

Where Count > 1;

LOAD Key,

  Count(Key) as Count

Resident Table

Group By Key;


Capture.PNG

Gysbert_Wassenaar

Another option:

Result:

LOAD

Key,

     EmployeeId,

     EmpName,

     EmpSalary,

     DateofJoin,

     City

WHERE

  Check>1;   

LOAD Key,

     EmployeeId,

     EmpName,

     EmpSalary,

     DateofJoin,

     City,

     AutoNumber(RecNo(), Key&'|'&EmployeeId&'|'&EmpName&'|'&EmpSalary&'|'&DateofJoin&'|'&City) as Check

FROM

  [comm203862.xlsx] (ooxml, embedded labels, table is Employee)

  ;


talk is cheap, supply exceeds demand