<?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: Ranking of text column by count of instances - works for test table, but not for measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-of-text-column-by-count-of-instances-works-for-test/m-p/4046556#M160507</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please try something like below whether it suits your requirement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Mgmt Mentions Ranking =
RANK (
    DENSE,
    SUMMARIZE (
        ALLSELECTED ( 'FACT Mgmt Convos' ),
        'FACT Mgmt Convos'[Secondary Processes Mentioned],
        'FACT Mgmt Convos'[Count of Process]
    ),
    ORDERBY ( 'FACT Mgmt Convos'[Count of Process], DESC )
)
&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 17 Jul 2024 17:01:34 GMT</pubDate>
    <dc:creator>Jihwan_Kim</dc:creator>
    <dc:date>2024-07-17T17:01:34Z</dc:date>
    <item>
      <title>Ranking of text column by count of instances - works for test table, but not for measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-of-text-column-by-count-of-instances-works-for-test/m-p/4046424#M160499</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a measure that ranks by the number of instances a text field appears in a table. For reference, the table is a simple table for a single line for every conversation with a business executive and the process that was discussed. I am trying to count each instance of the process that was discussed and rank them from most important to least (highest to lowest). Below is a snip of the main table (FYI I had to create a calculated column to count the instances of each process because I couldn't figure out how to build that into the measure).&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to get the result that I want when I test it by creating a blank table, but when it comes to putting it in a measure and in a matrix visual, the rank value appears as 1s for every single row and I can't seem to figure out why. Here is the DAX code of the test table I created and a snip of the output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;test = 
ADDCOLUMNS (
    SUMMARIZE (
        'FACT Mgmt Convos',
        'FACT Mgmt Convos'[Secondary Processes Mentioned],
        'FACT Mgmt Convos'[Count of Process]
    ),
    "Rank",
        RANK (
            DENSE,
            SUMMARIZE (
                'FACT Mgmt Convos',
                'FACT Mgmt Convos'[Secondary Processes Mentioned],
                'FACT Mgmt Convos'[Count of Process]
            ),
            ORDERBY ( 'FACT Mgmt Convos'[Count of Process], DESC )
        )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;As you can see, the Rank column works just fine. Below is my DAX code for the measure which is pretty much the same exact thing.&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;Mgmt Mentions Ranking = 
RANK (
    DENSE,
    SUMMARIZE (
            'FACT Mgmt Convos',
            'FACT Mgmt Convos'[Secondary Processes Mentioned],
            'FACT Mgmt Convos'[Count of Process]
        ),
    ORDERBY ( 'FACT Mgmt Convos'[Count of Process], DESC )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here is a snip of the matrix visual.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any guidance on why each row is populating with a rank of 1?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 15:33:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-of-text-column-by-count-of-instances-works-for-test/m-p/4046424#M160499</guid>
      <dc:creator>austin15g</dc:creator>
      <dc:date>2024-07-17T15:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking of text column by count of instances - works for test table, but not for measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-of-text-column-by-count-of-instances-works-for-test/m-p/4046556#M160507</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please try something like below whether it suits your requirement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Mgmt Mentions Ranking =
RANK (
    DENSE,
    SUMMARIZE (
        ALLSELECTED ( 'FACT Mgmt Convos' ),
        'FACT Mgmt Convos'[Secondary Processes Mentioned],
        'FACT Mgmt Convos'[Count of Process]
    ),
    ORDERBY ( 'FACT Mgmt Convos'[Count of Process], DESC )
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 17 Jul 2024 17:01:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-of-text-column-by-count-of-instances-works-for-test/m-p/4046556#M160507</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2024-07-17T17:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking of text column by count of instances - works for test table, but not for measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-of-text-column-by-count-of-instances-works-for-test/m-p/4046617#M160512</link>
      <description>&lt;P&gt;I was trying to toy around with ALLSELECTED but clearly wasn't putting it in the right position or something. Thank you so much, it worked perfectly!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 17:37:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-of-text-column-by-count-of-instances-works-for-test/m-p/4046617#M160512</guid>
      <dc:creator>austin15g</dc:creator>
      <dc:date>2024-07-17T17:37:00Z</dc:date>
    </item>
  </channel>
</rss>

