2
votes

When I try to combine two datasets (coming from same table with exactly the same structure), I'm using

Table.Combine({table1, table2})

Unfortunately this results in the following native SQL:

SELECT *
FROM table1
UNION ALL
SELECT *
FROM table2

I'd prefer to use a normal UNION instead... is there a way to achieve this in M?

1
Why are you worried about this? Do you use direct query?Aldert
I'm not sure if you can get M to use UNION in its native query or not, but you can remove duplicate rows after a UNION ALL to get the same end result.Alexis Olson
Yes, that is what I;'m using now, but it seems a bit redundant. @Aldert, both fetch IDs from the same table, which could be duplicate IDs. When I use this product for my Join later on, it could cause unwanted duplication (Inner Join).bo-oz

1 Answers

1
votes

The equivalent would be to add a Table.Distinct ( "Remove Duplicates" ) step, following the Table.Combine.