Forum Discussion
Practice Assessment Wrong? Power Query Sort and Remove Duplicates
- 1 year ago
Hi Tember,
Sorting and removing the duplicates is in general the correct answer. However, yes, it does not work all the time, and in my opinion, it is ambiguous, too as you stated.
In my projects, I never use this option, I rather go with inner joining with a duplicated version of the table having the max effective date grouped by customer id.
Regards,
Oktay
- 1 year ago
Yeah, the explanation sounds confusing. It could be a bug in the question/answer.
I would check out this blog: https://gorilla.bi/power-query/removing-duplicates/#advanced-techniques
Or write a native SQL query with ROW_NUMBER() PARTITION BY and the M function Value.NativeQuery() to maintain query folding if needed https://blog.crossjoin.co.uk/2021/02/21/query-folding-on-sql-queries-in-power-query-using-value-nativequery-and-enablefoldingtrue/
I have the same question on my practice exam, but mine asked for three applied steps, however, there are only two correct answers according to the assessment.
Is the answer incorrect and/or is there another correct choice in these options?
- OktayPamuk808 months agoResponsive Resident
Hi,
The only additional I can think of is to to choose the remove duplicates on the customer master table. I think, before the Buffer table, adding this ensures, you apply group by to a table with less size.
But yes, two options should be sufficient.
Regards,
Oktay