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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

Labels (1)
2 Replies
sunny_talwar
MVP
MVP

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
Partner - Champion III
Partner - Champion III

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