<?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: Rankx and summarized table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-and-summarized-table/m-p/1161601#M17820</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="19851" data-lia-user-login="Ashish_Mathur" class="lia-mention lia-mention-user"&gt;Ashish_Mathur&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="58173" data-lia-user-login="v-juanli-msft" class="lia-mention lia-mention-user"&gt;v-juanli-msft&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="3459" data-lia-user-login="Phil_Seamark" class="lia-mention lia-mention-user"&gt;Phil_Seamark&lt;/a&gt;&amp;nbsp;any suggestions.&lt;/P&gt;&lt;P&gt;Also is there a way to visualise the account catgeory based on the top 5 account names in a card/ chart visualisation.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Additionally I am using this for the best score to just show the best score as a figure without having the need for account names.&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR Tabless = ADDCOLUMNS( SUMMARIZE(sun, sun[Account Name], sun[Territory]), "Scores", [Current %], "Ranks", [Rank])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MINX( Tabless, [Scores])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jun 2020 03:14:40 GMT</pubDate>
    <dc:creator>CAPEconsulting</dc:creator>
    <dc:date>2020-06-16T03:14:40Z</dc:date>
    <item>
      <title>Rankx and summarized table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-and-summarized-table/m-p/1157591#M17723</link>
      <description>&lt;P&gt;I have a complex table where a column is flagged as denominator based on some variables and another column is flagged as numerator based on other criteria. Then a measure of proportion is calculated as the sum of all items flagged ad numerator divided by all items flagged as denominator. This is working fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I need to rank the clients based on the proportion while filtering out the clients that have less than 10 as the denominator.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just to work out my logic I did a calculated tables as follows&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Table = FILTER(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUMMARIZECOLUMNS(sun[Domain], sun[Date], sun[Attribute], sun[Account Name], sun[Territory], "Num", [Current Denominator], "Denom", [Current Denominator], "Score", [Current %]) , [Denom] &amp;gt; 10)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Then this table was used to create&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ranker = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;VAR Ranky = RANKX( ALL('Table'[Account Name]),&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;SUM( 'Table'[Score])&lt;/SPAN&gt;&lt;SPAN&gt;, , ASC)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;IF( Ranky &amp;lt;= 5,&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;SUM( 'Table'[Score])&lt;/SPAN&gt;&lt;SPAN&gt;, BLANK())&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This hence gives me the bar chart showing just the bottom 5 values.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Now I want to do the above as a measure rather than a physical table.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;But when I try this&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RANKX ( FILTER&lt;BR /&gt;FILTER(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUMMARIZECOLUMNS(sun[Domain], sun[Date], sun[Attribute], sun[Account Name], sun[Territory], "Num", [Current Denominator], "Denom", [Current Denominator], "Score", [Current %]) , [Denom] &amp;gt; 10), ALL(sun[Account Name])),&amp;nbsp;&amp;nbsp;[Current %], , ASC, DENSE))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;It keeps giving me all sort off errors like multiple filters were passed through rankx etc. I have amended many things but can't seem to replicate the physical table work in a virtual table measure based calculation.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any help....&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 14 Jun 2020 08:58:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-and-summarized-table/m-p/1157591#M17723</guid>
      <dc:creator>CAPEconsulting</dc:creator>
      <dc:date>2020-06-14T08:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx and summarized table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-and-summarized-table/m-p/1159290#M17756</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This is what I have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;rank = 
var __filtertbl = FILTER(ALL('Table');'Table'[Denominator]&amp;gt;10)
var __productsthatmeetfilter = CALCULATETABLE(ALLSELECTED('Table');__filtertbl)

return

//CALCULATE(CONCATENATEX(ALLSELECTED(Prods[Prod]);[Prod];"-"); __filtertbl) // to test / debug
MAXX('Table';IF('Table'[Denominator]&amp;gt;10;
RANKX(__productsthatmeetfilter;CALCULATE(MINX('Table';
'Table'[Numerator]/'Table'[Denominator]));;ASC;Skip)
; BLANK()))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As seen here:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;File is &lt;A href="https://1drv.ms/u/s!AvU6hhKLfmEcgdghRbkjIrb6D1MjoA?e=8oqdNA" target="_self"&gt;here&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please mark as solution if this works for you.&lt;/STRONG&gt;&amp;nbsp;Thumbs up for the effort is appreciated.&lt;/P&gt;&lt;P&gt;Kind regards, Steve.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2020 07:09:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-and-summarized-table/m-p/1159290#M17756</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-15T07:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx and summarized table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-and-summarized-table/m-p/1161412#M17816</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="4037" data-lia-user-login="stevedep" class="lia-mention lia-mention-user"&gt;stevedep&lt;/a&gt;&amp;nbsp;that did not work. just to clarify numerator and denominator are measures and not columns. For example&amp;nbsp;&lt;BR /&gt;Current Denominator = VAR Maxdate = CALCULATE( MAX( sun[Date]), ALLSELECTED(sun[Domain]), ALLSELECTED( sun[Attribute] ), ALLSELECTED( Calendar[Date] ))&lt;BR /&gt;RETURN&lt;BR /&gt;CALCULATE( [MeasureSum] , FILTER( SUMMARIZE( sun, sun[Denom], sun[Date] ), sun[Denom] = "Denom" &amp;amp;&amp;amp; sun[Date] = Maxdate ))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since my post I have tried the following and it work for most of it&lt;/P&gt;&lt;P&gt;Rank =&lt;BR /&gt;VAR Maxdate = CALCULATE( MAX( sun[Date]), ALLSELECTED(sun[Domain]), ALLSELECTED( sun[Attribute] ), ALLSELECTED( Calendar[Date] ))&lt;BR /&gt;VAR RankingTable = FILTER( ALLSELECTED(sun[Account Name]), [Current Denominator] &amp;gt; 10)&lt;BR /&gt;RETURN&lt;BR /&gt;RANKX( RankingTable, CALCULATE([Current %], FILTER(VALUES(Calendar[Date]), Maxdate)), ,ASC,Dense)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But despite of the&amp;nbsp;FILTER( ALLSELECTED(sun[Account Name]), [Current Denominator] &amp;gt; 10), it still ranks entities with denominator less than 10. So not sure what I am missing&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 01:35:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-and-summarized-table/m-p/1161412#M17816</guid>
      <dc:creator>CAPEconsulting</dc:creator>
      <dc:date>2020-06-16T01:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx and summarized table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-and-summarized-table/m-p/1161601#M17820</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="19851" data-lia-user-login="Ashish_Mathur" class="lia-mention lia-mention-user"&gt;Ashish_Mathur&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="58173" data-lia-user-login="v-juanli-msft" class="lia-mention lia-mention-user"&gt;v-juanli-msft&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="3459" data-lia-user-login="Phil_Seamark" class="lia-mention lia-mention-user"&gt;Phil_Seamark&lt;/a&gt;&amp;nbsp;any suggestions.&lt;/P&gt;&lt;P&gt;Also is there a way to visualise the account catgeory based on the top 5 account names in a card/ chart visualisation.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Additionally I am using this for the best score to just show the best score as a figure without having the need for account names.&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR Tabless = ADDCOLUMNS( SUMMARIZE(sun, sun[Account Name], sun[Territory]), "Scores", [Current %], "Ranks", [Rank])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MINX( Tabless, [Scores])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 03:14:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-and-summarized-table/m-p/1161601#M17820</guid>
      <dc:creator>CAPEconsulting</dc:creator>
      <dc:date>2020-06-16T03:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx and summarized table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-and-summarized-table/m-p/1161665#M17821</link>
      <description>&lt;P&gt;See using what I have the measure is still ranking an entity that has denominator less than 10.&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also please see top 5 table works fine but when territory is introduced it goes haywire&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;And it does not show just the top 5 anymore but starts showing all entities even though the measure uses top 5&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 03:33:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-and-summarized-table/m-p/1161665#M17821</guid>
      <dc:creator>CAPEconsulting</dc:creator>
      <dc:date>2020-06-16T03:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx and summarized table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-and-summarized-table/m-p/1162470#M17836</link>
      <description>&lt;P&gt;Perhaps you need to use nested interators to ensure values are calculated on the right level.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 09:09:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-and-summarized-table/m-p/1162470#M17836</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-16T09:09:47Z</dc:date>
    </item>
  </channel>
</rss>

