<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Practice Assessment Wrong? Power Query Sort and Remove Duplicates in Dataflow</title>
    <link>https://community.fabric.microsoft.com/t5/Dataflow/Practice-Assessment-Wrong-Power-Query-Sort-and-Remove-Duplicates/m-p/4239888#M4454</link>
    <description>&lt;P&gt;"Keep top rows" and "remove duplicates" are semantically different&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I haven't seen the question in the assessment, so I'll pass this feedback over to the team who owns it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nevertheless, doing a "remove duplicates" doesn't keep or take into consideration the ordinal position of the rows. This means that if you are doing a "remove duplicates" on a subset of the columns from your table and not the whole table, then there's no guarantee that the result of the operation will be based on the ordinal position of the rows like you saw them in a previous step. That's where the more explicit definition of a explicit logic that you define where your logic can set a flag (or a value) for what rows to keep would be a far better approach. Typically you could reach this by using the rank, group by or merge methods in combination with a filter rows. If you have a specific example, we could go over it and how you could be more specific with your logic to keep exactly the rows based on your explicit logic&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 13 Oct 2024 06:23:59 GMT</pubDate>
    <dc:creator>miguel</dc:creator>
    <dc:date>2024-10-13T06:23:59Z</dc:date>
    <item>
      <title>Practice Assessment Wrong? Power Query Sort and Remove Duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Practice-Assessment-Wrong-Power-Query-Sort-and-Remove-Duplicates/m-p/4218936#M4283</link>
      <description>&lt;P&gt;I am preparing for the Dp-600 Exam and one of the Practice Assessment questions is either wrong or very confusing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question:&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have a Fabric lakehouse named Lakehouse1 that contains a Dataflow Gen2 query. You have an Azure SQL database that contains a type 2 slowly changing dimension database table named CustomerMaster. CustomerMaster contains the following columns:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Customer ID – Number&lt;/LI&gt;&lt;LI&gt;EffectiveDate – Date&lt;/LI&gt;&lt;LI&gt;Address – Text&lt;/LI&gt;&lt;LI&gt;Status - Text&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;You plan to ingest CustomerMaster into Lakehouse1. The solution must only keep the latest record (unique) per Customer ID.&lt;/P&gt;&lt;P&gt;Which two applied steps should you use? Each correct answer presents part of the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Answers:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Keep top rows&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Max Customer ID&lt;/P&gt;&lt;P&gt;Remove duplicates on the Customer ID column&lt;/P&gt;&lt;P&gt;Remove duplicates on the CustomerMaster table&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sort on Customer ID, EffectiveDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The bolded selections are the correct answer with this explanation: "&lt;SPAN&gt;Sorting CustomerID and EffectiveDate, and then removing duplicates on the Customer ID column is the only way to keep the correct latest row per customer ID. All other options will not correctly keep the latest customer row per effective date."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;This answer confused me, so I clicked through to the explanation.&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-query/common-issues#preserving-sort" target="_blank" rel="noopener"&gt;Common Authoring Issues in Power Query - Power Query | Microsoft Learn&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It says:&lt;/P&gt;&lt;P&gt;You might assume that if you sort your data, any downstream operations preserve the sort order.&lt;/P&gt;&lt;P&gt;For example, if you sort a sales table so that each store's largest sale is shown first, you might expect that doing a "Remove duplicates" operation returns only the top sale for each store. And this operation might, in fact, appear to work. However, this behavior isn't guaranteed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So it literally contradicts what the answer said...&amp;nbsp; Am I misunderstanding something??&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2024 16:41:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Practice-Assessment-Wrong-Power-Query-Sort-and-Remove-Duplicates/m-p/4218936#M4283</guid>
      <dc:creator>tember</dc:creator>
      <dc:date>2024-10-04T16:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: Practice Assessment Wrong? Power Query Sort and Remove Duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Practice-Assessment-Wrong-Power-Query-Sort-and-Remove-Duplicates/m-p/4232462#M4400</link>
      <description>&lt;P&gt;Hi Tember,&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Oktay&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2024 20:39:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Practice-Assessment-Wrong-Power-Query-Sort-and-Remove-Duplicates/m-p/4232462#M4400</guid>
      <dc:creator>OktayPamuk80</dc:creator>
      <dc:date>2024-10-07T20:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: Practice Assessment Wrong? Power Query Sort and Remove Duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Practice-Assessment-Wrong-Power-Query-Sort-and-Remove-Duplicates/m-p/4239888#M4454</link>
      <description>&lt;P&gt;"Keep top rows" and "remove duplicates" are semantically different&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I haven't seen the question in the assessment, so I'll pass this feedback over to the team who owns it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nevertheless, doing a "remove duplicates" doesn't keep or take into consideration the ordinal position of the rows. This means that if you are doing a "remove duplicates" on a subset of the columns from your table and not the whole table, then there's no guarantee that the result of the operation will be based on the ordinal position of the rows like you saw them in a previous step. That's where the more explicit definition of a explicit logic that you define where your logic can set a flag (or a value) for what rows to keep would be a far better approach. Typically you could reach this by using the rank, group by or merge methods in combination with a filter rows. If you have a specific example, we could go over it and how you could be more specific with your logic to keep exactly the rows based on your explicit logic&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Oct 2024 06:23:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Practice-Assessment-Wrong-Power-Query-Sort-and-Remove-Duplicates/m-p/4239888#M4454</guid>
      <dc:creator>miguel</dc:creator>
      <dc:date>2024-10-13T06:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Practice Assessment Wrong? Power Query Sort and Remove Duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Practice-Assessment-Wrong-Power-Query-Sort-and-Remove-Duplicates/m-p/4239889#M4455</link>
      <description>&lt;P&gt;Yeah, the explanation sounds confusing. It could be a bug in the question/answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would check out this blog: &lt;A href="https://gorilla.bi/power-query/removing-duplicates/#advanced-techniques" target="_blank" rel="noopener"&gt;https://gorilla.bi/power-query/removing-duplicates/#advanced-techniques&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or write a native SQL query with ROW_NUMBER() PARTITION BY and the M function&amp;nbsp;&lt;SPAN&gt;Value.NativeQuery() to maintain query folding if needed&amp;nbsp;&lt;A href="https://blog.crossjoin.co.uk/2021/02/21/query-folding-on-sql-queries-in-power-query-using-value-nativequery-and-enablefoldingtrue/" target="_blank"&gt;https://blog.crossjoin.co.uk/2021/02/21/query-folding-on-sql-queries-in-power-query-using-value-nativequery-and-enablefoldingtrue/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Oct 2024 06:39:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Practice-Assessment-Wrong-Power-Query-Sort-and-Remove-Duplicates/m-p/4239889#M4455</guid>
      <dc:creator>frithjof_v</dc:creator>
      <dc:date>2024-10-13T06:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Practice Assessment Wrong? Power Query Sort and Remove Duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Practice-Assessment-Wrong-Power-Query-Sort-and-Remove-Duplicates/m-p/4240062#M4456</link>
      <description>&lt;P&gt;The Rank column (preview) function in Power Query Online is exciting!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it planned to support rank within partitions in the future?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And query folding? The indicator says "This step will be evaluated outside the data source".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Oct 2024 13:03:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Practice-Assessment-Wrong-Power-Query-Sort-and-Remove-Duplicates/m-p/4240062#M4456</guid>
      <dc:creator>frithjof_v</dc:creator>
      <dc:date>2024-10-13T13:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: Practice Assessment Wrong? Power Query Sort and Remove Duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Practice-Assessment-Wrong-Power-Query-Sort-and-Remove-Duplicates/m-p/4240582#M4460</link>
      <description>&lt;P&gt;I don't have a specific example - I am just working through the DP-600 material and this answer didn't sit well with me - especially when compared with the MS documentation.&amp;nbsp; I generally use the&amp;nbsp;&lt;SPAN&gt;ROW_NUMBER() PARTITION BY&amp;nbsp;technique (from miguel) or the MAX date (from OktayPamuk80) .&amp;nbsp; Looking for an explanation why that is the "right answer"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 05:10:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Practice-Assessment-Wrong-Power-Query-Sort-and-Remove-Duplicates/m-p/4240582#M4460</guid>
      <dc:creator>tember</dc:creator>
      <dc:date>2024-10-14T05:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Practice Assessment Wrong? Power Query Sort and Remove Duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Practice-Assessment-Wrong-Power-Query-Sort-and-Remove-Duplicates/m-p/4342805#M4719</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;Remove duplicates on the Customer ID column&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Sort on Customer ID, EffectiveDate&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;This answer is correct.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 25 Dec 2024 08:11:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Practice-Assessment-Wrong-Power-Query-Sort-and-Remove-Duplicates/m-p/4342805#M4719</guid>
      <dc:creator>Mandeepkaur</dc:creator>
      <dc:date>2024-12-25T08:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Practice Assessment Wrong? Power Query Sort and Remove Duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Practice-Assessment-Wrong-Power-Query-Sort-and-Remove-Duplicates/m-p/4880119#M5594</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Is the answer incorrect and/or is there another correct choice in these options?&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="791518" data-lia-user-login="OktayPamuk80" class="lia-mention lia-mention-user"&gt;OktayPamuk80&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="437984" data-lia-user-login="frithjof_v" class="lia-mention lia-mention-user"&gt;frithjof_v&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Nov 2025 17:10:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Practice-Assessment-Wrong-Power-Query-Sort-and-Remove-Duplicates/m-p/4880119#M5594</guid>
      <dc:creator>evybis</dc:creator>
      <dc:date>2025-11-19T17:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: Practice Assessment Wrong? Power Query Sort and Remove Duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Practice-Assessment-Wrong-Power-Query-Sort-and-Remove-Duplicates/m-p/4880262#M5595</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But yes, two options should be sufficient.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Oktay&lt;/P&gt;</description>
      <pubDate>Wed, 19 Nov 2025 20:27:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Practice-Assessment-Wrong-Power-Query-Sort-and-Remove-Duplicates/m-p/4880262#M5595</guid>
      <dc:creator>OktayPamuk80</dc:creator>
      <dc:date>2025-11-19T20:27:53Z</dc:date>
    </item>
  </channel>
</rss>

