Hi can you share sample output file like what you want to achieve?
to remove only duplicates you can use remove duplicate activity it will remove all the rows which has duplicate values.
as i can see invoice numbers are not duplicates so if you remove duplicates from clients it will also remove invoice numbers of that repeting clients.