Forum Discussion

grggmrtn's avatar
grggmrtn
Post Patron
5 years ago

Remove duplicates without breaking query folding?

Is there a way to remove duplicates without breaking query folding? I need the folding (for incremental refresh), but I have a ton of duplicates (I go from 3 0378 271 rows to 10 472 after removing duplicates)...

7 Replies

  • Use a Group By transform instead - that will fold on SQL data sources.

    OPTIONAL - If you don't want an aggregate column added to the rowset (so you want it to behave functionally exactly like a remove duplicates), then edit the M that gets generated to remove the aggregate. For example, turn this:

    = Table.Group(Source, {"Grouping Column 1","Grouping Column 2"}, {{"Count", each 1, type Int64}})

    into this:

    = Table.Group(Source, {"Grouping Column 1","Grouping Column 2"}, {})