<?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: DAX for Power BI similar to RANK.AVG in Excel in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-Power-BI-similar-to-RANK-AVG-in-Excel/m-p/2160495#M49946</link>
    <description>&lt;P&gt;Thank you so much! This worked!&lt;/P&gt;</description>
    <pubDate>Thu, 28 Oct 2021 09:31:11 GMT</pubDate>
    <dc:creator>robibanadera</dc:creator>
    <dc:date>2021-10-28T09:31:11Z</dc:date>
    <item>
      <title>DAX for Power BI similar to RANK.AVG in Excel</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-Power-BI-similar-to-RANK-AVG-in-Excel/m-p/2140008#M49184</link>
      <description>&lt;P&gt;Hello! I need help in making a column similar to the results using RANK.AVG in Excel. I have table where there are values that are the same. And when I try to rank them, the results is like this:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Value | Rank&lt;/P&gt;&lt;P&gt;5 | 2&lt;/P&gt;&lt;P&gt;10 | 5&lt;/P&gt;&lt;P&gt;5 | 2&lt;/P&gt;&lt;P&gt;5 | 2&lt;/P&gt;&lt;P&gt;1 | 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First, I want those values that are the same to have continuous rankings. Then those with same rankings get their continuous ranks averaged. Example below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Value | Rank | Rank.Avg&lt;/P&gt;&lt;P&gt;5 | 2 | 3&lt;/P&gt;&lt;P&gt;10 | 5 | 5&lt;/P&gt;&lt;P&gt;5 | 3 | 3&lt;/P&gt;&lt;P&gt;5 | 4 | 3&lt;/P&gt;&lt;P&gt;1 | 1 | 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope someone can help me with this! Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 07:45:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-Power-BI-similar-to-RANK-AVG-in-Excel/m-p/2140008#M49184</guid>
      <dc:creator>robibanadera</dc:creator>
      <dc:date>2021-10-18T07:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for Power BI similar to RANK.AVG in Excel</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-Power-BI-similar-to-RANK-AVG-in-Excel/m-p/2140024#M49186</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="321412" data-lia-user-login="robibanadera" class="lia-mention lia-mention-user"&gt;robibanadera&lt;/a&gt; , for the rank avg &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try a new column&lt;/P&gt;
&lt;P&gt;Rankx(Table, Table[Value],,asc,skip)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the second column - Rank try like&lt;/P&gt;
&lt;P&gt;Rankx(Table, Table[Value]+rand()/100,,asc,skip)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 07:49:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-Power-BI-similar-to-RANK-AVG-in-Excel/m-p/2140024#M49186</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-10-18T07:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for Power BI similar to RANK.AVG in Excel</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-Power-BI-similar-to-RANK-AVG-in-Excel/m-p/2140037#M49189</link>
      <description>&lt;P&gt;Hi, thanks for your reply!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the first formula you gave but it's still skipping ranks. What I would like is to have continuous ranking regardless if the values are the same. So for example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Value | Rank&lt;/P&gt;&lt;P&gt;1 | 1&lt;/P&gt;&lt;P&gt;5 | 2&lt;/P&gt;&lt;P&gt;5 | 3&lt;/P&gt;&lt;P&gt;5 | 4&lt;/P&gt;&lt;P&gt;7 | 5&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 07:57:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-Power-BI-similar-to-RANK-AVG-in-Excel/m-p/2140037#M49189</guid>
      <dc:creator>robibanadera</dc:creator>
      <dc:date>2021-10-18T07:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for Power BI similar to RANK.AVG in Excel</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-Power-BI-similar-to-RANK-AVG-in-Excel/m-p/2140060#M49190</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="321412" data-lia-user-login="robibanadera" class="lia-mention lia-mention-user"&gt;robibanadera&lt;/a&gt; , That was the second formula. But works better if you create a new column &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;col 2 = ([Column1]+RAND()/100.0)&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;Column = RANKX(RankT,[col 2],,ASC,Dense)&lt;/DIV&gt;
&lt;/DIV&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;</description>
      <pubDate>Mon, 18 Oct 2021 08:11:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-Power-BI-similar-to-RANK-AVG-in-Excel/m-p/2140060#M49190</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-10-18T08:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for Power BI similar to RANK.AVG in Excel</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-Power-BI-similar-to-RANK-AVG-in-Excel/m-p/2141777#M49240</link>
      <description>&lt;P&gt;Oooh nice. This works! My only problem now would be on how to average rankings having the same values. In your screenshot, the rows having same value of 5 has rankings 2, 4, and 3. Can we get a ranking like the computation in Excel function &lt;STRONG&gt;Rank.Avg&lt;/STRONG&gt; where the ranking having same values are averaged, in this case it would look like this instead&lt;BR /&gt;&lt;BR /&gt;Value | Rank. Avg&lt;BR /&gt;1 | 1&lt;/P&gt;&lt;P&gt;5 | 3&lt;/P&gt;&lt;P&gt;5 | 3&lt;/P&gt;&lt;P&gt;5 | 3&lt;/P&gt;&lt;P&gt;7 | 5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Their ranks would all be 3 because 2+3+4/3 is 3. Rankings were averaged.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 01:40:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-Power-BI-similar-to-RANK-AVG-in-Excel/m-p/2141777#M49240</guid>
      <dc:creator>robibanadera</dc:creator>
      <dc:date>2021-10-19T01:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for Power BI similar to RANK.AVG in Excel</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-Power-BI-similar-to-RANK-AVG-in-Excel/m-p/2146921#M49426</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="321412" data-lia-user-login="robibanadera" class="lia-mention lia-mention-user"&gt;robibanadera&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;You can create a column like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rank.Avg =
VAR t1 =
    ADDCOLUMNS ( 'Table', "New", ROUND ( [Value] + RAND () / 100.0, 4 ) )
VAR t2 =
    ADDCOLUMNS ( t1, "Rank", RANKX ( t1, [New],, ASC, DENSE ) )
RETURN
    AVERAGEX ( FILTER ( t2, [Value] = EARLIER ( 'Table'[Value] ) ), [Rank] )
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Yingjie Li&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 02:00:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-Power-BI-similar-to-RANK-AVG-in-Excel/m-p/2146921#M49426</guid>
      <dc:creator>v-yingjl</dc:creator>
      <dc:date>2021-10-21T02:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for Power BI similar to RANK.AVG in Excel</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-Power-BI-similar-to-RANK-AVG-in-Excel/m-p/2159881#M49936</link>
      <description>&lt;P&gt;Hi, can you give me the last formula as a measure?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 06:01:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-Power-BI-similar-to-RANK-AVG-in-Excel/m-p/2159881#M49936</guid>
      <dc:creator>robibanadera</dc:creator>
      <dc:date>2021-10-28T06:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for Power BI similar to RANK.AVG in Excel</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-Power-BI-similar-to-RANK-AVG-in-Excel/m-p/2159948#M49939</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="321412" data-lia-user-login="robibanadera" class="lia-mention lia-mention-user"&gt;robibanadera&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;The measure would be like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
VAR t1 =
    ADDCOLUMNS ( ALL('Table'), "New", ROUND ( [Value] + RAND () / 100.0, 4 ) )
VAR t2 =
    ADDCOLUMNS ( t1, "Rank", RANKX ( t1, [New],, ASC, DENSE ) )
RETURN
    AVERAGEX ( FILTER ( t2, [Value] = MAX('Table'[Value]) ), [Rank] )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Yingjie Li&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 06:35:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-Power-BI-similar-to-RANK-AVG-in-Excel/m-p/2159948#M49939</guid>
      <dc:creator>v-yingjl</dc:creator>
      <dc:date>2021-10-28T06:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for Power BI similar to RANK.AVG in Excel</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-Power-BI-similar-to-RANK-AVG-in-Excel/m-p/2160495#M49946</link>
      <description>&lt;P&gt;Thank you so much! This worked!&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 09:31:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-Power-BI-similar-to-RANK-AVG-in-Excel/m-p/2160495#M49946</guid>
      <dc:creator>robibanadera</dc:creator>
      <dc:date>2021-10-28T09:31:11Z</dc:date>
    </item>
  </channel>
</rss>

