Forum Discussion
REMOVING DUPLICATES AND MERGING QUERIES
- 1 year ago
on the steps, after sorting data, a new step will added into your query steps which its formula starts with Table.Sort(....), befor removing the duplicteas, revise this formula by addin Table.Buffer befor it and rewrite the formula as
Table.Buffer(Table.Sort(....))then remove duplicat. your peoblem become solved
Ok. But wouldn't that be a bug in powerquery? Your 2 examples should be equivalent. In both cases S0 should be evaluated first because S1 depends on it...
It might be but not in all the case, consider this example
S0=Source,
S1= Table.Addcolumn(S0,"x",....),
S2=Table.Group(S1,"A", {"m",Table.RowCount})
it is true that s2 is calculated based on S1, but its result does not dependent to the result of S1, if you use S0 also in this function, the result would be the same (adding a new column, does not changed the result of counting the rows)