Newbie Question - remove duplicates of a particular value

This is probably a really silly question, but here goes:

I am attempting to open up a qvd, filter on a specific column and then remove the duplicates of that result, then save the file again as a whole minus those removed duplicates.

For example: I have a file of many actions that have a name attached, so I am filtering down to person A and then removing their duplicates and then saving the file again as a whole, with those duplicates removed. Rather than removing ever duplicate in the file.

Hope this makes sense, all help appreciated.

Welcome to the Community, Neil!

First of all - there are no silly questions on the Community forum as long as they relate to data transformation :slight_smile:

As for your question, there can be several approaches. I believe, the most typical would be marking rows that need to be deleted, then deleting them. In this case, the rows to be deleted can be identified as these that satisfy 2 conditions:

  1. Person’s name = ‘Person A’.
  2. It’s not the first encounter of the person’s name.

In the example below, to enumerate occurrences of particular name the "Enumerate rows" action is used (for each name). Marking done using the expression below:

[RowNo] > 1 and [Name] = {Name}

Where {Name} in curly braces is a parameter. Notice that the result of the expression is either TRUE or FALSE.

Finally, filtering is done for rows where the marker column is FALSE.

remove-rows-complex-condition.morph (3.3 KB)

Thanks for this, I will give this a try :smiley: