<?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: Rank and TOPN in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rank-and-TOPN/m-p/1265429#M21190</link>
    <description>&lt;P&gt;None of the transactions for the selected day are in the Top 5.&lt;/P&gt;</description>
    <pubDate>Fri, 31 Jul 2020 17:01:25 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2020-07-31T17:01:25Z</dc:date>
    <item>
      <title>Rank and TOPN</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rank-and-TOPN/m-p/1263119#M21091</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have one DAX Function called TOPN and it works perfectly, show me the TOP5&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;But when i use the Date Filter the sales column works, the Rank Works, &amp;nbsp;but the TOPN returns Blank.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;My Measures RANK and TOPN&amp;nbsp;&lt;/P&gt;&lt;P&gt;&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;Ranking Ticket Medio Procedimentos = 
IF([Ticket Medio Fat. Proced],
    RANKX(
        ALL(D_TIPO_PROCEDIMENTO[nome]),
        [Ticket Medio Fat. Proced]
    )
)

TOP N Ticket Médio Procedimentos = 
var topNSelecionado = SELECTEDVALUE('TopN'[N],5)
return
CALCULATE(
    [Ticket Medio Fat. Proced],
    FILTER(
        VALUES(D_TIPO_PROCEDIMENTO[nome]),
        [Ranking Ticket Medio Procedimentos] &amp;lt;= topNSelecionado
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 19:32:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rank-and-TOPN/m-p/1263119#M21091</guid>
      <dc:creator>marcio_fornari</dc:creator>
      <dc:date>2020-07-30T19:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: Rank and TOPN</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rank-and-TOPN/m-p/1265429#M21190</link>
      <description>&lt;P&gt;None of the transactions for the selected day are in the Top 5.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 17:01:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rank-and-TOPN/m-p/1265429#M21190</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-07-31T17:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: Rank and TOPN</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rank-and-TOPN/m-p/1265432#M21191</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;i found the problem. It was a relationship&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 17:04:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rank-and-TOPN/m-p/1265432#M21191</guid>
      <dc:creator>marcio_fornari</dc:creator>
      <dc:date>2020-07-31T17:04:26Z</dc:date>
    </item>
  </channel>
</rss>

