<?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: URGENT!! Ranking measure not working. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Ranking-measure-not-working/m-p/3749919#M146273</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I revised your measure to:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Ranking SingleSelect = 
RANKX(ALLSELECTED('df_Search Order (First)'[Search Order (First)]), [Category_Occasion_SingleSelect%], , DESC, Dense)
&lt;/LI-CODE&gt;
&lt;P&gt;This also works&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Ranking SingleSelect 1 = 
RANK(DENSE,SUMMARIZE(ALLSELECTED('df_Search Order (First)'),'df_Search Order (First)'[Search Order (First)],"A",[Category_Occasion_SingleSelect%]),orderby([A],DESC))&lt;/LI-CODE&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Mar 2024 00:20:08 GMT</pubDate>
    <dc:creator>Ashish_Mathur</dc:creator>
    <dc:date>2024-03-08T00:20:08Z</dc:date>
    <item>
      <title>URGENT!! Ranking measure not working.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Ranking-measure-not-working/m-p/3748964#M146219</link>
      <description>&lt;P&gt;Hello Power BI community!&lt;A href="https://community.fabric.microsoft.com/t5/forums/editpage/board-id/DAXCommands/message-id/144660#" target="_blank" rel="noopener"&gt;Preview&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me with the below ranking code?&amp;nbsp;This code is giving me the same ranking for different % of search order columns:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SortingOrderSearchOrder_SingleSelect = 
VAR SelectedProducts =
    {"Search Order (First)",
"Brand First",
"Category First",
"Flavour Variant First",
"Format First",
"Not Answered",
"Nutritional Content First",
"Others First",
"Pack Size First",
"Pack Type First",
"Packaging Design First",
"Price First",
"Product Origin First",
"Promotion First",
"Returnable Packaging First",
"Temperature First",
"Try New First",
"Unit Type First"
}

RETURN
IF(
    max('df_Search Order (First)'[Search Order (First)]) IN SelectedProducts,
    RANKX(
        FILTER(
            ALL('df_Search Order (First)'[Search Order (First)]),
            'df_Search Order (First)'[Search Order (First)] IN SelectedProducts
        ),
        [Ranking SingleSelect],
        ,
        ASC
    ),
    0
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;below is a screenshot of the measure -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Following are the reference measures used:&amp;nbsp;&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;Category_Occasion_SingleSelect% = 
    [DistinctCount_Category_Occasions_SingleSelect]/
        [TotalSum_Category_Occasion_SingleSelect]&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Ranking SingleSelect = 
RANKX(ALL('df_Search Order (First)'[Search Order (First)]), [Category_Occasion_SingleSelect%], , DESC, Dense)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="14361" data-lia-user-login="MFelix" class="lia-mention lia-mention-user"&gt;MFelix&lt;/a&gt;&amp;nbsp;,&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;,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="19851" data-lia-user-login="Ashish_Mathur" class="lia-mention lia-mention-user"&gt;Ashish_Mathur&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 07 Mar 2024 13:43:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Ranking-measure-not-working/m-p/3748964#M146219</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-07T13:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT!! Ranking measure not working.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Ranking-measure-not-working/m-p/3748994#M146220</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Have you used any other column to sort this column ? if yes then you need to include the sorting column into ALL() incase if you want to remove filters on that column.&lt;/P&gt;&lt;PRE&gt;'df_Search Order (First)'[Search Order (First)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;P&gt;If the post helps please give a thumbs up&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;If it solves your issue, please accept it as the solution to help the other members find it more quickly.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Tharun&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 13:59:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Ranking-measure-not-working/m-p/3748994#M146220</guid>
      <dc:creator>tharunkumarRTK</dc:creator>
      <dc:date>2024-03-07T13:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT!! Ranking measure not working.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Ranking-measure-not-working/m-p/3749025#M146224</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="685422" data-lia-user-login="tharunkumarRTK" class="lia-mention lia-mention-user"&gt;tharunkumarRTK&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sroting 'df_Search Order (First)'[Search Order (First)] column with any other column. I'm not sure why this is happening&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 14:16:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Ranking-measure-not-working/m-p/3749025#M146224</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-07T14:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT!! Ranking measure not working.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Ranking-measure-not-working/m-p/3749038#M146226</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Okay, not sure why you are using two rank functions. Will it be possible for you to share the pbix file with sample data? and expected result.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 14:21:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Ranking-measure-not-working/m-p/3749038#M146226</guid>
      <dc:creator>tharunkumarRTK</dc:creator>
      <dc:date>2024-03-07T14:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT!! Ranking measure not working.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Ranking-measure-not-working/m-p/3749162#M146233</link>
      <description>&lt;P&gt;yeah sure, Here is the link to the sample dashboard:&amp;nbsp;&lt;A href="https://drive.google.com/file/d/1_-nOngtU4ZKV_Ju-_km_pm4V-FELqRN6/view?usp=sharing" target="_self"&gt;https://drive.google.com/file/d/1_-nOngtU4ZKV_Ju-_km_pm4V-FELqRN6/view?usp=sharing&lt;/A&gt;&lt;BR /&gt;and here is the expected result:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 15:27:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Ranking-measure-not-working/m-p/3749162#M146233</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-07T15:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT!! Ranking measure not working.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Ranking-measure-not-working/m-p/3749287#M146238</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I was wondering why cannot you use this pattern&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;RANKX( ALLSELECTED('df_Search Order (First)'[Search Order (First)])  , [Category_Occasion_SingleSelect%]) &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;P&gt;If the post helps please give a thumbs up&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;If it solves your issue, please accept it as the solution to help the other members find it more quickly.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Tharun&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 16:18:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Ranking-measure-not-working/m-p/3749287#M146238</guid>
      <dc:creator>tharunkumarRTK</dc:creator>
      <dc:date>2024-03-07T16:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT!! Ranking measure not working.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Ranking-measure-not-working/m-p/3749919#M146273</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I revised your measure to:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Ranking SingleSelect = 
RANKX(ALLSELECTED('df_Search Order (First)'[Search Order (First)]), [Category_Occasion_SingleSelect%], , DESC, Dense)
&lt;/LI-CODE&gt;
&lt;P&gt;This also works&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Ranking SingleSelect 1 = 
RANK(DENSE,SUMMARIZE(ALLSELECTED('df_Search Order (First)'),'df_Search Order (First)'[Search Order (First)],"A",[Category_Occasion_SingleSelect%]),orderby([A],DESC))&lt;/LI-CODE&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 00:20:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Ranking-measure-not-working/m-p/3749919#M146273</guid>
      <dc:creator>Ashish_Mathur</dc:creator>
      <dc:date>2024-03-08T00:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT!! Ranking measure not working.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Ranking-measure-not-working/m-p/3751079#M146298</link>
      <description>&lt;P&gt;Thanks a lot&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="19851" data-lia-user-login="Ashish_Mathur" class="lia-mention lia-mention-user"&gt;Ashish_Mathur&lt;/a&gt;&amp;nbsp;for the help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 09:27:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Ranking-measure-not-working/m-p/3751079#M146298</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-08T09:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT!! Ranking measure not working.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Ranking-measure-not-working/m-p/3751081#M146299</link>
      <description>&lt;P&gt;Thanks a lot&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="685422" data-lia-user-login="tharunkumarRTK" class="lia-mention lia-mention-user"&gt;tharunkumarRTK&lt;/a&gt;&amp;nbsp;@&amp;nbsp;for the help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 09:28:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Ranking-measure-not-working/m-p/3751081#M146299</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-08T09:28:27Z</dc:date>
    </item>
  </channel>
</rss>

