<?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: Dynamic Ranking - Measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-Measure/m-p/3103753#M109237</link>
    <description>&lt;P&gt;Please ignore the previous message, I've fixed it by using the office name from the actual table as opposed the the area table!&lt;/P&gt;</description>
    <pubDate>Tue, 28 Feb 2023 13:36:01 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-02-28T13:36:01Z</dc:date>
    <item>
      <title>Dynamic Ranking - Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-Measure/m-p/3101887#M109089</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm struggling to do dynamic ranking which changes based on my filters.&amp;nbsp; I've managed to do a ranked column which works fine - just can't get my head around creating a measure to do the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My data is like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;List of office locations with a % attached:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g&lt;/P&gt;&lt;P&gt;Name&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Rank&lt;/P&gt;&lt;P&gt;London&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 10.2%&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;&lt;P&gt;Manchester&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6.7%&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;&lt;P&gt;Birmingham&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4.8%&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;&lt;P&gt;Leeds&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8.3%&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Area Table&lt;/P&gt;&lt;P&gt;Area 1 = Manchester, Leeds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am then connected to an area table so if I filter on for example area 1, it returns Manchester and Leeds and I want the rank to recalculate.&amp;nbsp; I'm connected to a folder data source and have created a new table for the latest figures using lastdate.&amp;nbsp; My files within the folder are just excel which are added to monthly and contain a row for each office location.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to write the measure on the newly created last date table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for any help!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 15:50:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-Measure/m-p/3101887#M109089</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-27T15:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Ranking - Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-Measure/m-p/3102006#M109104</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;You may like this:&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/To-Bleep-with-RANKX/m-p/1042520#M452" target="_blank"&gt;To *Bleep* with RANKX! - Microsoft Power BI Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Here is the CALCULATE approach:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rank Measure = RANKX(ALLSELECTED('Table'),CALCULATE(SUM('Table'[%])),,DESC)&lt;/LI-CODE&gt;
&lt;P&gt;And the No CALCULATE approach:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rank No Calculate Measure = 
    VAR __Name = MAX('Table'[Name])
    VAR __Table = 
        ADDCOLUMNS(
            ALLSELECTED('Table'),
            "__Rank", RANKX(ALLSELECTED('Table'),[%],,DESC)
        )
    VAR __Result = MAXX(FILTER(__Table,[Name] = __Name),[__Rank])
RETURN
    __Result&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 27 Feb 2023 16:28:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-Measure/m-p/3102006#M109104</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-02-27T16:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Ranking - Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-Measure/m-p/3103039#M109180</link>
      <description>&lt;P&gt;Brill, thank you so much! The no calculate one works perfectly!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd tried with the calculate one and it was returning the sum of the filter - e.g. I have 50 offices it dispayed 50 on every line and then if I filtered to 10 it would show that.&amp;nbsp; I thought I was doing something wrong so glad we got the same results for that one!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for all your help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 07:20:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-Measure/m-p/3103039#M109180</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-28T07:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Ranking - Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-Measure/m-p/3103725#M109230</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry in follow up to this question, when I drop the no calculate ranking into my table it resets all other columns until a slicer is selected, for example, I can see a list of office locations but all the %'s return 0% and ranking returns 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be great!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 13:24:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-Measure/m-p/3103725#M109230</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-28T13:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Ranking - Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-Measure/m-p/3103753#M109237</link>
      <description>&lt;P&gt;Please ignore the previous message, I've fixed it by using the office name from the actual table as opposed the the area table!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 13:36:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-Measure/m-p/3103753#M109237</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-28T13:36:01Z</dc:date>
    </item>
  </channel>
</rss>

