<?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 in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKx/m-p/3123203#M110856</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure how your datamodel looks like, but I think you can try using other than SUMMARIZE function in the measure.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Mar 2023 06:35:05 GMT</pubDate>
    <dc:creator>Jihwan_Kim</dc:creator>
    <dc:date>2023-03-10T06:35:05Z</dc:date>
    <item>
      <title>RANKx</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKx/m-p/3117556#M110432</link>
      <description>&lt;P&gt;I have a live connection to a "locked" dataset that sits on top of a SSAS model. so I can only create measures. I have a table that has a bunch of columns including CustomerID , ProductID and Date Purchased along with 20 other columns. I would like to rank by customerID, Product ID based on Date Purchased Descending. This would repeat for each customer . so here how I am picturing the ranking to apply (I'm not displaying this data like this on a visual/dashboard)&lt;BR /&gt;&lt;BR /&gt;Ex :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CustomerID&amp;nbsp; &amp;nbsp; ProductID&amp;nbsp; &amp;nbsp; &amp;nbsp; Date Purchased&amp;nbsp; &amp;nbsp; Rank&lt;BR /&gt;1234&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1-1-2023&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;BR /&gt;1234&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1-1-2022&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;BR /&gt;1234&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1-1-2019&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;BR /&gt;3456&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1-1-2020&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;BR /&gt;3456&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1-1-2018&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;BR /&gt;3456&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1-1-2020&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 23:48:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKx/m-p/3117556#M110432</guid>
      <dc:creator>memoalkatib1</dc:creator>
      <dc:date>2023-03-07T23:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: RANKx</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKx/m-p/3117960#M110454</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rank measure: =
IF (
    HASONEVALUE ( Data[CustomerID] ) &amp;amp;&amp;amp; HASONEVALUE ( Data[ProductID] ),
    CALCULATE (
        COUNTROWS (
            SUMMARIZE ( Data, Data[CustomerID], Data[ProductID], Data[Date Purchased] )
        ),
        WINDOW (
            1,
            ABS,
            0,
            REL,
            SUMMARIZE (
                ALL ( Data ),
                Data[CustomerID],
                Data[ProductID],
                Data[Date Purchased]
            ),
            ORDERBY ( Data[Date Purchased], DESC ),
            KEEP,
            PARTITIONBY ( Data[CustomerID], Data[ProductID] )
        )
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 04:53:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKx/m-p/3117960#M110454</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-03-08T04:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: RANKx</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKx/m-p/3122437#M110804</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;. This works wonderfuly and is exactly what I am looking for. However, it does not seem to work with Direct Query connection. Is that a limitation ? is there an alternative way to calcuate this using Direct Query/ Live connection mode ?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 20:01:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKx/m-p/3122437#M110804</guid>
      <dc:creator>memoalkatib1</dc:creator>
      <dc:date>2023-03-09T20:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: RANKx</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKx/m-p/3123203#M110856</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure how your datamodel looks like, but I think you can try using other than SUMMARIZE function in the measure.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 06:35:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKx/m-p/3123203#M110856</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-03-10T06:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: RANKx</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKx/m-p/3124258#M110923</link>
      <description>&lt;P&gt;The "Window" built in function is not supported with live connection/ direct query. I tried subsituting the window function with summerize and other built in functions, but not geting the right ouput. Are you able to shed some insights to how that can be done ? I would highly appreciate it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 15:00:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKx/m-p/3124258#M110923</guid>
      <dc:creator>memoalkatib1</dc:creator>
      <dc:date>2023-03-10T15:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: RANKx</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKx/m-p/3449114#M131328</link>
      <description>&lt;P&gt;I Have same scenario,&lt;BR /&gt;&amp;nbsp;I am trying to use this solution&lt;BR /&gt;When i tried this i am getting all values in the measure as 1&lt;BR /&gt;how can i get correct values&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 07:08:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKx/m-p/3449114#M131328</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-27T07:08:35Z</dc:date>
    </item>
  </channel>
</rss>

