Only show unique values of a column in table

Is there a way, in analyzer or ETL, where we can only display one row for each unique value of a column corresponding to a key column? For example, I would want this:

ID   Num
1    4
1    4
1    5
2    4
2    5
2    6
3    6
3    7
3    7

to become this:

ID   Num
1    4
1    5
2    4
2    5
2    6
3    6
3    7

Best Answer

Answers

  • Great, thank you. How would I approach the logic of removing duplicates only within a unique ID? I don't want to remove all duplicates, just `Num`s that appear multiple times within a corresponding ID (see example). @RobSomers thanks!

  • RobSomers
    RobSomers 🟢
    edited August 18

    @jrtomici The Remove Duplicates tile should let you select multiple columns, so you would select the ID and Num columns to look for duplicates and in your example it would see row 2 and 3 as duplicates, and then the ETL would remove one of them and you would just be left with one row with ID of 1 and Num of 4. It would leave rows 6 and 7 alone because 2-6 and 3-6 are not duplicates. They have an example of what this looks like in the link to page about Remove Duplicates.

    **Was this post helpful? Click Agree or Like below**

    **Did this solve your problem? Accept it as a solution!**

  • Thank you so much!