<?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 Need partition in ranking in power query editor or Dataflows in Fabric in Dataflow</title>
    <link>https://community.fabric.microsoft.com/t5/Dataflow/Need-partition-in-ranking-in-power-query-editor-or-Dataflows-in/m-p/3363243#M602</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I have a CTE in my sql which is giving ranking in a table and below is the code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select *, rank() over(partition by Empstatus,Emprole,Empdept order by empid) as Empid_Rank from EmployeeTable&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;now my requirement is, i wanted to create same ranking column&lt;STRONG&gt; in power query editor&lt;/STRONG&gt; not in DAX.&lt;/P&gt;&lt;P&gt;can someone lookinto it and help me.&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Aug 2023 08:17:20 GMT</pubDate>
    <dc:creator>sudhav</dc:creator>
    <dc:date>2023-08-03T08:17:20Z</dc:date>
    <item>
      <title>Need partition in ranking in power query editor or Dataflows in Fabric</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Need-partition-in-ranking-in-power-query-editor-or-Dataflows-in/m-p/3363243#M602</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I have a CTE in my sql which is giving ranking in a table and below is the code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select *, rank() over(partition by Empstatus,Emprole,Empdept order by empid) as Empid_Rank from EmployeeTable&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;now my requirement is, i wanted to create same ranking column&lt;STRONG&gt; in power query editor&lt;/STRONG&gt; not in DAX.&lt;/P&gt;&lt;P&gt;can someone lookinto it and help me.&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2023 08:17:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Need-partition-in-ranking-in-power-query-editor-or-Dataflows-in/m-p/3363243#M602</guid>
      <dc:creator>sudhav</dc:creator>
      <dc:date>2023-08-03T08:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need partition in ranking in power query editor or Dataflows in Fabric</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Need-partition-in-ranking-in-power-query-editor-or-Dataflows-in/m-p/3363253#M603</link>
      <description>&lt;P&gt;hi!&lt;/P&gt;
&lt;P&gt;Could you please share a more thorough example on what you're trying to achieve? if you can share a sample dataset and a sample output that would help us understand more what you're trying to accomplish without being directly associated with a language different than the one used by Power Query (inside of Dataflows).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a more generic answer, when it comes to doing ranks in Power Query you can use the Rank column feature as described in the article below:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-query/rank-column" target="_blank"&gt;Rank column (Preview) - Power Query | Microsoft Learn&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2023 08:23:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Need-partition-in-ranking-in-power-query-editor-or-Dataflows-in/m-p/3363253#M603</guid>
      <dc:creator>miguel</dc:creator>
      <dc:date>2023-08-03T08:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Need partition in ranking in power query editor or Dataflows in Fabric</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Need-partition-in-ranking-in-power-query-editor-or-Dataflows-in/m-p/3633583#M1533</link>
      <description>&lt;P&gt;Did you ever work this out? I also need rank over partition and can't seem to find how.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone can pick this up, an example table for me personally would be something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;Modified_Date&lt;/TD&gt;&lt;TD&gt;Rank&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1001&lt;/TD&gt;&lt;TD&gt;01-01-2024&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1001&lt;/TD&gt;&lt;TD&gt;05-01-2024&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1002&lt;/TD&gt;&lt;TD&gt;03-01-2024&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1003&lt;/TD&gt;&lt;TD&gt;07-01-2024&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output provides the latest modified from the table partitioned by ID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 14:43:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Need-partition-in-ranking-in-power-query-editor-or-Dataflows-in/m-p/3633583#M1533</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-11T14:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need partition in ranking in power query editor or Dataflows in Fabric</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Need-partition-in-ranking-in-power-query-editor-or-Dataflows-in/m-p/3633706#M1535</link>
      <description>&lt;P&gt;Is this what you are looking for?&lt;BR /&gt;&lt;A href="https://blog.crossjoin.co.uk/2015/05/11/nested-calculations-in-power-query/" target="_blank" rel="noopener"&gt;Chris Webb's BI Blog: Nested Calculations In Power Query (crossjoin.co.uk)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://data-witches.com/2020/10/21/adding-a-row-rank-based-on-a-different-column-with-power-query/" target="_blank"&gt;Adding a row rank based on a different column with Power Query – data witches (data-witches.com)&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 15:38:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Need-partition-in-ranking-in-power-query-editor-or-Dataflows-in/m-p/3633706#M1535</guid>
      <dc:creator>fabricator1</dc:creator>
      <dc:date>2024-01-11T15:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need partition in ranking in power query editor or Dataflows in Fabric</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Need-partition-in-ranking-in-power-query-editor-or-Dataflows-in/m-p/3633716#M1536</link>
      <description>&lt;P&gt;Thats absolutely what I'm looking for! Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 15:39:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Need-partition-in-ranking-in-power-query-editor-or-Dataflows-in/m-p/3633716#M1536</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-11T15:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need partition in ranking in power query editor or Dataflows in Fabric</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Need-partition-in-ranking-in-power-query-editor-or-Dataflows-in/m-p/3633992#M1539</link>
      <description>&lt;P&gt;Hi Shadow,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rank Column transform doesn't support partitions directly, but as a workaround you can first group rows in your table by the field you want to use as a partition criteria, then rank each of the partitions, and finally expand your nested ranked tables back into a single flat table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a sample M script that does this over the data example you shared:&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;let&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText(&lt;/SPAN&gt;&lt;SPAN&gt;"i45WMjQwMFTSUTLUN9Q3MjAyUYrVQRIzRREzAosZo4gZg8XMoWKxAA=="&lt;/SPAN&gt;&lt;SPAN&gt;, BinaryEncoding.Base64), Compression.Deflate)), &lt;/SPAN&gt;&lt;SPAN&gt;let&lt;/SPAN&gt;&lt;SPAN&gt; _t = ((&lt;/SPAN&gt;&lt;SPAN&gt;type&lt;/SPAN&gt;&lt;SPAN&gt; nullable &lt;/SPAN&gt;&lt;SPAN&gt;text&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;meta&lt;/SPAN&gt;&lt;SPAN&gt; [Serialized.Text = &lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;]) &lt;/SPAN&gt;&lt;SPAN&gt;in&lt;/SPAN&gt; &lt;SPAN&gt;type&lt;/SPAN&gt; &lt;SPAN&gt;table&lt;/SPAN&gt;&lt;SPAN&gt; [ID = _t, ModifiedDate = _t]),&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; #"Changed column type" = Table.TransformColumnTypes(Source, {{&lt;/SPAN&gt;&lt;SPAN&gt;"ID"&lt;/SPAN&gt;&lt;SPAN&gt;, Int64.Type}, {&lt;/SPAN&gt;&lt;SPAN&gt;"ModifiedDate"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;type&lt;/SPAN&gt; &lt;SPAN&gt;date&lt;/SPAN&gt;&lt;SPAN&gt;}}),&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; #"Grouped rows" = Table.Group(#"Changed column type", {&lt;/SPAN&gt;&lt;SPAN&gt;"ID"&lt;/SPAN&gt;&lt;SPAN&gt;}, {{&lt;/SPAN&gt;&lt;SPAN&gt;"Data"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;each&lt;/SPAN&gt;&lt;SPAN&gt; _, &lt;/SPAN&gt;&lt;SPAN&gt;type&lt;/SPAN&gt;&lt;SPAN&gt; nullable &lt;/SPAN&gt;&lt;SPAN&gt;table&lt;/SPAN&gt;&lt;SPAN&gt;[ID = nullable Int64.Type, ModifiedDate = nullable &lt;/SPAN&gt;&lt;SPAN&gt;date&lt;/SPAN&gt;&lt;SPAN&gt;]}}),&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; #"Added custom" = Table.AddColumn(#"Grouped rows", &lt;/SPAN&gt;&lt;SPAN&gt;"Custom"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;each&lt;/SPAN&gt;&lt;SPAN&gt; Table.AddRankColumn([Data], &lt;/SPAN&gt;&lt;SPAN&gt;"Rank"&lt;/SPAN&gt;&lt;SPAN&gt;, {{&lt;/SPAN&gt;&lt;SPAN&gt;"ModifiedDate"&lt;/SPAN&gt;&lt;SPAN&gt;, Order.Descending}})),&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; #"Removed columns" = Table.RemoveColumns(#"Added custom", {&lt;/SPAN&gt;&lt;SPAN&gt;"Data"&lt;/SPAN&gt;&lt;SPAN&gt;}),&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; #"Expanded Custom" = Table.ExpandTableColumn(#"Removed columns", &lt;/SPAN&gt;&lt;SPAN&gt;"Custom"&lt;/SPAN&gt;&lt;SPAN&gt;, {&lt;/SPAN&gt;&lt;SPAN&gt;"ID"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"ModifiedDate"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"Rank"&lt;/SPAN&gt;&lt;SPAN&gt;}, {&lt;/SPAN&gt;&lt;SPAN&gt;"ID.1"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"ModifiedDate"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"Rank"&lt;/SPAN&gt;&lt;SPAN&gt;}),&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; #"Removed columns 1" = Table.RemoveColumns(#"Expanded Custom", {&lt;/SPAN&gt;&lt;SPAN&gt;"ID.1"&lt;/SPAN&gt;&lt;SPAN&gt;})&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;in&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; #"Removed columns 1"&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Hope that helps!&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 11 Jan 2024 18:04:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Need-partition-in-ranking-in-power-query-editor-or-Dataflows-in/m-p/3633992#M1539</guid>
      <dc:creator>mllopis</dc:creator>
      <dc:date>2024-01-11T18:04:58Z</dc:date>
    </item>
  </channel>
</rss>

