<?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: RankX by group occurrance in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-by-group-occurrance/m-p/3029352#M103458</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;This is related to the post you helped solve yesterday:&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Help-getting-latest-date-for-earlier-value/m-p/3027038#M103256" target="_blank"&gt;https://community.powerbi.com/t5/DAX-Commands-and-Tips/Help-getting-latest-date-for-earlier-value/m-p/3027038#M103256&lt;/A&gt;&lt;/P&gt;&lt;P&gt;(Thanks again for that!)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran into a scenario today that didn't fit with the previous solution for the &lt;EM&gt;Responsibility Index&lt;/EM&gt; column. Here's the result in the current scenario assuming the solution from this previous post:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LOA_Logs[Index per LOA] -
RANKX(
    CALCULATETABLE(
        LOA_Logs,
        ALLEXCEPT(LOA_Logs, LOA_Logs[LOA_UID], LOA_Logs[Responsibility])
    ),
    LOA_Logs[Index per LOA],
    ,
    ASC,
   Dense
)&lt;/LI-CODE&gt;&lt;P&gt;Desired output in &lt;STRONG&gt;&lt;FONT color="#339966"&gt;green&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Jan 2023 17:35:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-01-18T17:35:47Z</dc:date>
    <item>
      <title>RankX by group occurrance</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-by-group-occurrance/m-p/3029334#M103455</link>
      <description>&lt;P&gt;I have a table below and am trying to rank order each occurrence of change in Responsibility using a calculated column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see, the code is counting 1 for each instance of a unique occurrence of a Responsibility (so the first time "PCR" appears, it says 1, the second time, 2, etc., and the first time "Enroller" appears, it says 1, the second time, 2, etc...)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the DAX generating this result:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;RANKX(
    FILTER(
        ALL(LOA_Logs),
        LOA_Logs[LOA_UID] = EARLIER(LOA_Logs[LOA_UID])
        &amp;amp;&amp;amp; LOA_Logs[Responsibility] = EARLIER(LOA_Logs[Responsibility])),
    LOA_Logs[Index per LOA],
    ,ASC,Dense)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead, what I'd like it to generate is a unique index each time the Responsibility &lt;STRONG&gt;changes&lt;/STRONG&gt;. So ideally, this table would return the numbers in green. Each rank changes as the Responsibility changes.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated. Thank you so much!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 17:27:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-by-group-occurrance/m-p/3029334#M103455</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-18T17:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: RankX by group occurrance</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-by-group-occurrance/m-p/3029352#M103458</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;This is related to the post you helped solve yesterday:&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Help-getting-latest-date-for-earlier-value/m-p/3027038#M103256" target="_blank"&gt;https://community.powerbi.com/t5/DAX-Commands-and-Tips/Help-getting-latest-date-for-earlier-value/m-p/3027038#M103256&lt;/A&gt;&lt;/P&gt;&lt;P&gt;(Thanks again for that!)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran into a scenario today that didn't fit with the previous solution for the &lt;EM&gt;Responsibility Index&lt;/EM&gt; column. Here's the result in the current scenario assuming the solution from this previous post:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LOA_Logs[Index per LOA] -
RANKX(
    CALCULATETABLE(
        LOA_Logs,
        ALLEXCEPT(LOA_Logs, LOA_Logs[LOA_UID], LOA_Logs[Responsibility])
    ),
    LOA_Logs[Index per LOA],
    ,
    ASC,
   Dense
)&lt;/LI-CODE&gt;&lt;P&gt;Desired output in &lt;STRONG&gt;&lt;FONT color="#339966"&gt;green&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 17:35:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-by-group-occurrance/m-p/3029352#M103458</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-18T17:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: RankX by group occurrance</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-by-group-occurrance/m-p/3029452#M103467</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the results seems to be as expected. What is specifically the problem?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 18:53:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-by-group-occurrance/m-p/3029452#M103467</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-01-18T18:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: RankX by group occurrance</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-by-group-occurrance/m-p/3029491#M103470</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;-&lt;/P&gt;&lt;P&gt;The issue is that the Responsibility Index needs to be sorted in order of Responsibility changes (ie, by CreateDate).&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;LOA_FSID&lt;/TD&gt;&lt;TD&gt;CreateDate&lt;/TD&gt;&lt;TD&gt;Index per LOA&lt;/TD&gt;&lt;TD&gt;Responsibility&lt;/TD&gt;&lt;TD&gt;Responsibility Index (current)&lt;/TD&gt;&lt;TD&gt;Responsibility Index (desired)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;540-18653&lt;/TD&gt;&lt;TD&gt;11/10/2022 10:06:48 PM&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;PCR&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;540-18653&lt;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t;540-18653&lt;/TD&gt;&lt;TD&gt;1/9/2023 10:37:26 AM&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;PCR&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;540-18653&lt;/TD&gt;&lt;TD&gt;1/13/2023 1:57:17 PM&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;Enroller&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;540-18653&lt;/TD&gt;&lt;TD&gt;1/13/2023 8:19:28 PM&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;PCR&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In other words, the desired output is that the ranking continues each time Responsibility changes - not to track the ranking per Responsibility.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps clarify!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 19:15:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-by-group-occurrance/m-p/3029491#M103470</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-18T19:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: RankX by group occurrance</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-by-group-occurrance/m-p/3029545#M103474</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Actually the dax for the index2 column is just fine and works as intended. But I just realized that the measure is missing something propably dropped by mistake. Please try&lt;/P&gt;
&lt;P&gt;Responsibility Set Date =&lt;BR /&gt;MINX (&lt;BR /&gt;CALCULATETABLE (&lt;BR /&gt;LOA_Logs,&lt;BR /&gt;ALLEXCEPT (&lt;BR /&gt;LOA_Logs,&lt;BR /&gt;LOA_Logs[LOA_UID],&lt;BR /&gt;LOA_Logs[Responsibility],&lt;BR /&gt;LOA_Logs[Index2]&lt;BR /&gt;)&lt;BR /&gt;),&lt;BR /&gt;LOA_Logs[CreateDate]&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 19:49:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-by-group-occurrance/m-p/3029545#M103474</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-01-18T19:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: RankX by group occurrance</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-by-group-occurrance/m-p/3029617#M103483</link>
      <description>&lt;P&gt;That's helpful for the Responsibility Set Date column, but is there a way to get the index column to produce the results requested below?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 20:24:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-by-group-occurrance/m-p/3029617#M103483</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-18T20:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: RankX by group occurrance</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-by-group-occurrance/m-p/3029631#M103484</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;I take that back - adding LOA_Logs[Responsibility] into the ALLEXCEPT solved it for the date field and got me to the desired end result. Thanks again for all your help!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 20:41:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-by-group-occurrance/m-p/3029631#M103484</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-18T20:41:46Z</dc:date>
    </item>
  </channel>
</rss>

