<?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 RANKX Only Returning 1 in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-Only-Returning-1/m-p/1772243#M37091</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was hoping you would be able to help me. I have tried various options from other forum posts, but have not got anywhere.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a RANKX formula to rank the sites I have, by the number of tickets they have issued, but it always ranks all of the sites as 1 in my table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I originally used this DAX fomula, with no sucess:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Site Rank = &lt;SPAN&gt;RANKX (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ALLSELECTED(V_Locations[Location Name]), CALCULATE([Total Issued])),&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt; DESC,&lt;/SPAN&gt;&lt;SPAN&gt; DENSE)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp;[Total Issued] =&amp;nbsp;DISTINCTCOUNT(R_Issued[Reference]) - R_Issued is the list of tickets issued.&lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then tried the following, based on another post, which worked for them, but I still get them all as 1:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Site Rank = &lt;SPAN&gt;RANKX (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ALLSELECTED(V_Locations[Location Name]), CALCULATE(DISTINCTCOUNT(R_Issued[Reference])),&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt; DESC,&lt;/SPAN&gt;&lt;SPAN&gt; DENSE)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could anyone tell me what I am doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be much appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best wishes,&lt;/P&gt;&lt;P&gt;Helen&lt;/P&gt;</description>
    <pubDate>Wed, 07 Apr 2021 13:20:33 GMT</pubDate>
    <dc:creator>HelenBrunyee</dc:creator>
    <dc:date>2021-04-07T13:20:33Z</dc:date>
    <item>
      <title>RANKX Only Returning 1</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-Only-Returning-1/m-p/1772243#M37091</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was hoping you would be able to help me. I have tried various options from other forum posts, but have not got anywhere.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a RANKX formula to rank the sites I have, by the number of tickets they have issued, but it always ranks all of the sites as 1 in my table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I originally used this DAX fomula, with no sucess:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Site Rank = &lt;SPAN&gt;RANKX (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ALLSELECTED(V_Locations[Location Name]), CALCULATE([Total Issued])),&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt; DESC,&lt;/SPAN&gt;&lt;SPAN&gt; DENSE)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp;[Total Issued] =&amp;nbsp;DISTINCTCOUNT(R_Issued[Reference]) - R_Issued is the list of tickets issued.&lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then tried the following, based on another post, which worked for them, but I still get them all as 1:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Site Rank = &lt;SPAN&gt;RANKX (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ALLSELECTED(V_Locations[Location Name]), CALCULATE(DISTINCTCOUNT(R_Issued[Reference])),&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt; DESC,&lt;/SPAN&gt;&lt;SPAN&gt; DENSE)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could anyone tell me what I am doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be much appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best wishes,&lt;/P&gt;&lt;P&gt;Helen&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 13:20:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-Only-Returning-1/m-p/1772243#M37091</guid>
      <dc:creator>HelenBrunyee</dc:creator>
      <dc:date>2021-04-07T13:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: RANKX Only Returning 1</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-Only-Returning-1/m-p/1772262#M37093</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="243841" data-lia-user-login="HelenBrunyee" class="lia-mention lia-mention-user"&gt;HelenBrunyee&lt;/a&gt; , If you use any other column in visual than V_Locations[Location Name]) then rank will repeat inside that column .&lt;/P&gt;
&lt;P&gt;Assume you use location id , then you will get all rank as 1, as there is only one location inside location id&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then you have to try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Site Rank = RANKX (&lt;BR /&gt;ALLSELECTED(V_Locations[Location Name],V_Locations[Location ID]), CALCULATE(DISTINCTCOUNT(R_Issued[Reference])),, DESC, DENSE)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For Rank Refer these links&lt;BR /&gt;&lt;A href="https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures" target="_blank"&gt;https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns" target="_blank"&gt;https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale" target="_blank"&gt;https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 13:26:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-Only-Returning-1/m-p/1772262#M37093</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-04-07T13:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: RANKX Only Returning 1</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-Only-Returning-1/m-p/1772309#M37098</link>
      <description>&lt;P&gt;You're a star! Thank you so much&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That worked perfectly, and also your explanation makes much more sense as to why it wasn't working and how to use RNAKX in the future.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Helen&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 13:52:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-Only-Returning-1/m-p/1772309#M37098</guid>
      <dc:creator>HelenBrunyee</dc:creator>
      <dc:date>2021-04-07T13:52:46Z</dc:date>
    </item>
  </channel>
</rss>

