<?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 on calculated measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3553929#M136756</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="403667" data-lia-user-login="123abc" class="lia-mention lia-mention-user"&gt;123abc&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get a different error now which is;&lt;/P&gt;&lt;P&gt;Earlier/Earliest refers to an earlier context which doesn't exist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know how to resolve?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;GrahamR99&lt;/P&gt;</description>
    <pubDate>Mon, 27 Nov 2023 11:04:29 GMT</pubDate>
    <dc:creator>GrahamR99</dc:creator>
    <dc:date>2023-11-27T11:04:29Z</dc:date>
    <item>
      <title>Ranking on calculated measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3553647#M136746</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hello&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I have this formula;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Distance (Rank) = &lt;/SPAN&gt;&lt;SPAN&gt;RANKX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Legacy Events Planning 2024'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Legacy Events Planning 2024'&lt;/SPAN&gt;&lt;SPAN&gt;[Supporter_Postcode]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;EARLIER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Legacy Events Planning 2024'&lt;/SPAN&gt;&lt;SPAN&gt;[Supporter_Postcode]&lt;/SPAN&gt;&lt;SPAN&gt;)),&lt;/SPAN&gt;&lt;SPAN&gt;'Legacy Events Planning 2024'&lt;/SPAN&gt;&lt;SPAN&gt;[Distance (km)]&lt;/SPAN&gt;&lt;SPAN&gt;,,&lt;/SPAN&gt;&lt;SPAN&gt;ASC&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Dense&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I get this error;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;A circular dependency was detected.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Distance (km) is a calculated field.&amp;nbsp; Which I guess is the reason I get this error.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;How do I rank the data and get around this error?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you for reading.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;GrahamR99&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 27 Nov 2023 09:18:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3553647#M136746</guid>
      <dc:creator>GrahamR99</dc:creator>
      <dc:date>2023-11-27T09:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking on calculated measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3553869#M136749</link>
      <description>&lt;P&gt;You can try this modified Dax funciton:&lt;/P&gt;&lt;P&gt;Distance (Rank) =&lt;BR /&gt;RANKX(&lt;BR /&gt;FILTER(&lt;BR /&gt;'Legacy Events Planning 2024',&lt;BR /&gt;'Legacy Events Planning 2024'[Supporter_Postcode] = EARLIER('Legacy Events Planning 2024'[Supporter_Postcode])&lt;BR /&gt;),&lt;BR /&gt;CALCULATE('Legacy Events Planning 2024'[Distance (km)]),&lt;BR /&gt;,&lt;BR /&gt;ASC,&lt;BR /&gt;Dense&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this modified formula, I replaced 'Legacy Events Planning 2024'[Distance (km)] with CALCULATE('Legacy Events Planning 2024'[Distance (km)]). This can help break the circular dependency, as CALCULATE allows you to create a context transition and evaluate the measure in a different context.&lt;/P&gt;&lt;P&gt;Try this modification and see if it resolves the circular dependency issue. If you encounter any further issues or if you have additional requirements, feel free to provide more details.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If this post&amp;nbsp;helps, then please consider&amp;nbsp;Accepting it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In case there is still a problem, please feel free and explain your issue in detail,&amp;nbsp;It will be my pleasure to assist you in any way I can.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2023 10:42:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3553869#M136749</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2023-11-27T10:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking on calculated measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3553929#M136756</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="403667" data-lia-user-login="123abc" class="lia-mention lia-mention-user"&gt;123abc&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get a different error now which is;&lt;/P&gt;&lt;P&gt;Earlier/Earliest refers to an earlier context which doesn't exist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know how to resolve?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;GrahamR99&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2023 11:04:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3553929#M136756</guid>
      <dc:creator>GrahamR99</dc:creator>
      <dc:date>2023-11-27T11:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking on calculated measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3554114#M136767</link>
      <description>&lt;P&gt;Plz use this modified DAX:&lt;/P&gt;&lt;P&gt;Distance (Rank) =&lt;BR /&gt;RANKX(&lt;BR /&gt;FILTER(&lt;BR /&gt;'Legacy Events Planning 2024',&lt;BR /&gt;'Legacy Events Planning 2024'[Supporter_Postcode] = EARLIER('Legacy Events Planning 2024'[Supporter_Postcode])&lt;BR /&gt;),&lt;BR /&gt;CALCULATE(&lt;BR /&gt;SUM('Legacy Events Planning 2024'[Distance (km)]),&lt;BR /&gt;ALLEXCEPT('Legacy Events Planning 2024', 'Legacy Events Planning 2024'[Supporter_Postcode])&lt;BR /&gt;),&lt;BR /&gt;,&lt;BR /&gt;ASC,&lt;BR /&gt;Dense&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if not work please sahre Pbxi file or excel file with sample data.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2023 12:16:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3554114#M136767</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2023-11-27T12:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking on calculated measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3554342#M136789</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="403667" data-lia-user-login="123abc" class="lia-mention lia-mention-user"&gt;123abc&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The last formula didn't work,.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't upload a file on this forum and my organisation will not let me share the file to anyone out side the organisation on Onedrive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are going to have to explain how I get the file to you?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;GrahamR99&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2023 14:16:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3554342#M136789</guid>
      <dc:creator>GrahamR99</dc:creator>
      <dc:date>2023-11-27T14:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking on calculated measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3556367#M136891</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="403667" data-lia-user-login="123abc" class="lia-mention lia-mention-user"&gt;123abc&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there another way you can help me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have three columns,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Site Postcode,&lt;/P&gt;&lt;P&gt;Sup Postcode,&lt;/P&gt;&lt;P&gt;Distance (km)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have mulple sites, and a sup postcode for each site, then the distance (km) is calculated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Site Postcode&lt;/TD&gt;&lt;TD&gt;Sup Postcode&lt;/TD&gt;&lt;TD&gt;Distnace (km)&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Rank&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AAA&lt;/TD&gt;&lt;TD&gt;ABC&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;2&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AAA&lt;/TD&gt;&lt;TD&gt;BCD&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AAA&lt;/TD&gt;&lt;TD&gt;DEF&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;BBB&lt;/TD&gt;&lt;TD&gt;ABC&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;BBB&lt;/TD&gt;&lt;TD&gt;BCD&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;2&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;BBB&lt;/TD&gt;&lt;TD&gt;DEF&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I write the rank formual for this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;GrahamR99&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 11:46:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3556367#M136891</guid>
      <dc:creator>GrahamR99</dc:creator>
      <dc:date>2023-11-28T11:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking on calculated measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3556377#M136892</link>
      <description>&lt;P&gt;You can try this DAX:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Rank =&lt;BR /&gt;RANKX (&lt;BR /&gt;FILTER (&lt;BR /&gt;YourTable,&lt;BR /&gt;[Site Postcode] = EARLIER ( [Site Postcode] )&lt;BR /&gt;),&lt;BR /&gt;[Distance (km)],&lt;BR /&gt;,&lt;BR /&gt;ASC,&lt;BR /&gt;Dense&lt;BR /&gt;)&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This formula uses the RANKX function to calculate the rank based on the 'Distance (km)' column for each 'Site Postcode' group. The EARLIER function is used to refer to the current row's 'Site Postcode' when filtering.&lt;/P&gt;&lt;P&gt;Here's a step-by-step explanation of the formula:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;FILTER(YourTable, [Site Postcode] = EARLIER([Site Postcode])):&lt;/STRONG&gt; This part of the formula filters the table to include only rows where the 'Site Postcode' is equal to the current row's 'Site Postcode'. This ensures that the ranking is done separately for each site.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;RANKX(..., [Distance (km)], ..., ASC, Dense):&lt;/STRONG&gt; This part of the formula calculates the rank based on the 'Distance (km)' column in ascending order (ASC) and using dense ranking (Dense).&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;You can add this DAX formula to your Power BI table to create the 'Rank' column. Keep in mind that you need to replace 'YourTable' with the actual name of your table.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 11:54:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3556377#M136892</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2023-11-28T11:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking on calculated measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3556380#M136893</link>
      <description>&lt;P&gt;If you encounter a specific error or face challenges with a particular DAX formula, feel free to share the relevant portions of the code or describe the issue in detail. I'll do my best to provide guidance based on the information you provide within the text format of this conversation.&lt;/P&gt;&lt;P&gt;If you have specific DAX expressions or parts of your Power BI model that you'd like assistance with, please share the relevant details, and I'll try to help you troubleshoot the problem.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 11:57:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3556380#M136893</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2023-11-28T11:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking on calculated measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3556513#M136914</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="403667" data-lia-user-login="123abc" class="lia-mention lia-mention-user"&gt;123abc&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry it doesn't work, I get this error message.&lt;/P&gt;&lt;P&gt;Earlier/earliest refers to an row context which doesn't exist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why is this happing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;GrahamR99&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 13:18:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3556513#M136914</guid>
      <dc:creator>GrahamR99</dc:creator>
      <dc:date>2023-11-28T13:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking on calculated measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3556555#M136921</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="403667" data-lia-user-login="123abc" class="lia-mention lia-mention-user"&gt;123abc&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry I got the table wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I have is mulitple sites, and a set amount of supporters,&amp;nbsp; I have joined every site to every supporter, then calculated how far they are from each other.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Site Postcode&lt;/TD&gt;&lt;TD&gt;Sup Postcode&lt;/TD&gt;&lt;TD&gt;Distance (km)&lt;/TD&gt;&lt;TD&gt;Rank&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AAA&lt;/TD&gt;&lt;TD&gt;ABC&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;BBB&lt;/TD&gt;&lt;TD&gt;ABC&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CCC&lt;/TD&gt;&lt;TD&gt;ABC&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DDD&lt;/TD&gt;&lt;TD&gt;ABC&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AAA&lt;/TD&gt;&lt;TD&gt;ZXY&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;BBB&lt;/TD&gt;&lt;TD&gt;ZXY&lt;/TD&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CCC&lt;/TD&gt;&lt;TD&gt;ZXY&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DDD&lt;/TD&gt;&lt;TD&gt;ZXY&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I get this ranking, and the data is not sorted, so these are all mixed up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I get the ranking?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;GrahamR99&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 13:42:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3556555#M136921</guid>
      <dc:creator>GrahamR99</dc:creator>
      <dc:date>2023-11-28T13:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking on calculated measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3556573#M136925</link>
      <description>&lt;P&gt;hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="45049" data-lia-user-login="GrahamR99" class="lia-mention lia-mention-user"&gt;GrahamR99&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="45049" data-lia-user-login="GrahamR99" class="lia-mention lia-mention-user"&gt;GrahamR99&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try to make new column&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Column = 
RANK(
     DENSE,
     ALLSELECTED(
         'Table (2)'[Sup Postcode],
         'Table (2)'[Distance (km)]
    ),
    ORDERBY('Table (2)'[Distance (km)],ASC)
    ,,PARTITIONBY('Table (2)'[Sup Postcode])
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&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;if you want to measure then try below code&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure 2 = 
var a = ALL('Table (2)'[Distance (km)],'Table (2)'[Sup Postcode])
return
RANK(
    DENSE,
    a,
    ORDERBY(
        'Table (2)'[Distance (km)],
        ASC
    ),,
    PARTITIONBY('Table (2)'[Sup Postcode])
    
)&lt;/LI-CODE&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;</description>
      <pubDate>Tue, 28 Nov 2023 13:58:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3556573#M136925</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2023-11-28T13:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking on calculated measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3556626#M136931</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="569583" data-lia-user-login="Dangar332" class="lia-mention lia-mention-user"&gt;Dangar332&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Distance (km) is a measure and with both of your formulas it won't let me select it in parts of the formulas.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there anything else I can try?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;GrahamR99&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 14:15:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3556626#M136931</guid>
      <dc:creator>GrahamR99</dc:creator>
      <dc:date>2023-11-28T14:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking on calculated measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3556712#M136941</link>
      <description>&lt;P&gt;hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="45049" data-lia-user-login="GrahamR99" class="lia-mention lia-mention-user"&gt;GrahamR99&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;update code&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure 2 = 
var a = ADDCOLUMNS(ALLSELECTED('Table (2)'[Site Postcode],'Table (2)'[Sup Postcode]),"@amt",CALCULATE([distance(km)]))
return
RANK(
    DENSE,
    a,
    ORDERBY(
        [@amt],asc
        ,'Table (2)'[Site Postcode],DESC
    ),,
    PARTITIONBY('Table (2)'[Sup Postcode])
    
)&lt;/LI-CODE&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;</description>
      <pubDate>Tue, 28 Nov 2023 14:43:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3556712#M136941</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2023-11-28T14:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking on calculated measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3556764#M136947</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="569583" data-lia-user-login="Dangar332" class="lia-mention lia-mention-user"&gt;Dangar332&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That formula works, as in it calculates, but all the rankings are 7, which is how many sites I have with different sup postcodes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there anything else we can try?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The solution maybe very simple, I don't know how to use the rankx formula and only started with one I found on google.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Graham Rock&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 15:09:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3556764#M136947</guid>
      <dc:creator>GrahamR99</dc:creator>
      <dc:date>2023-11-28T15:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking on calculated measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3556792#M136949</link>
      <description>&lt;P&gt;HI,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="45049" data-lia-user-login="GrahamR99" class="lia-mention lia-mention-user"&gt;GrahamR99&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;it work without calculate also&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure 2 = 
var a = ADDCOLUMNS(ALLSELECTED('Table (2)'[Site Postcode],'Table (2)'[Sup Postcode]),"@amt",[distance(km)])
return
RANK(
    DENSE,
    a,
    ORDERBY(
        [@amt],asc
        ,'Table (2)'[Site Postcode],DESC
    ),,
    PARTITIONBY('Table (2)'[Sup Postcode])
    
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 15:20:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3556792#M136949</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2023-11-28T15:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking on calculated measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3556807#M136952</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="569583" data-lia-user-login="Dangar332" class="lia-mention lia-mention-user"&gt;Dangar332&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is 7 too for all rows. No ranking.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;GrahamR99&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 15:30:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3556807#M136952</guid>
      <dc:creator>GrahamR99</dc:creator>
      <dc:date>2023-11-28T15:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking on calculated measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3562804#M137330</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="569583" data-lia-user-login="Dangar332" class="lia-mention lia-mention-user"&gt;Dangar332&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idears why I'm always getting 7 on each row?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there anything else we can try?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;GrahamR99&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 09:59:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3562804#M137330</guid>
      <dc:creator>GrahamR99</dc:creator>
      <dc:date>2023-12-01T09:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking on calculated measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3562855#M137333</link>
      <description>&lt;P&gt;please share pbix file ... further i share with you my ranking issues and their solution hope your issue will be resolved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OR follow this link:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/Rankx-Ranking-by-state-and-by-city-multiple-level-of-hierarchy/m-p/3011879" target="_blank"&gt;(2) Rankx, Ranking by state and by city (multiple leve... - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;OR follow this link;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/RankX-at-Category-level-for-Category-SubCategory-context/m-p/3554064#M1170966" target="_blank"&gt;Solved: Re: RankX at Category level for Category/SubCatego... - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;OR follow this link:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-for-Main-Category-then-for-furthermore-4-sub-category/m-p/3555655#M136851" target="_blank"&gt;Solved: RANKX for Main Category then for furthermore 4 sub... - Microsoft Fabric Community&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-for-Main-Category-then-for-furthermore-4-sub-category/m-p/3555655#M136851" target="_blank"&gt;https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-for-Main-Category-then-for-furthermore-4-sub-category/m-p/3555655#M136851&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If this post&amp;nbsp;helps, then please consider&amp;nbsp;Accepting it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In case there is still a problem, please feel free and explain your issue in detail,&amp;nbsp;It will be my pleasure to assist you in any way I can.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 10:31:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3562855#M137333</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2023-12-01T10:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking on calculated measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3562870#M137334</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="403667" data-lia-user-login="123abc" class="lia-mention lia-mention-user"&gt;123abc&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I share the Power BI file with you?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;GrahamR99&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 10:45:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3562870#M137334</guid>
      <dc:creator>GrahamR99</dc:creator>
      <dc:date>2023-12-01T10:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking on calculated measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3562983#M137340</link>
      <description>&lt;P&gt;1: Save your data on googel one drive.&lt;/P&gt;&lt;P&gt;2: Set your save data security to visiulize for every one.&lt;/P&gt;&lt;P&gt;3: Share link of your data here.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 11:55:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-on-calculated-measure/m-p/3562983#M137340</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2023-12-01T11:55:08Z</dc:date>
    </item>
  </channel>
</rss>

