<?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 RANKX new column to get top 10 customers with Lowest % in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-new-column-to-get-top-10-customers-with-Lowest/m-p/2130588#M48890</link>
    <description>&lt;P&gt;I tried using TOP N to filter a visual I have in order to get the top 5 lowest % values per customer. For some reason Top N Bottom is not working. Sometimes I get more than 5, sometimes less.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I read that a new column can be created using DAX RANKX feature in order to accomplish this, but having trouble getting it to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's what I'd like to do:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Table 'XXX - Local' I want to rank the % values from 'XXX - Local'[% AAN SENT] from worst to best, and then diplay the top 10 worst in matrix table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Oct 2021 20:06:15 GMT</pubDate>
    <dc:creator>m_roussakis</dc:creator>
    <dc:date>2021-10-12T20:06:15Z</dc:date>
    <item>
      <title>RANKX new column to get top 10 customers with Lowest %</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-new-column-to-get-top-10-customers-with-Lowest/m-p/2130588#M48890</link>
      <description>&lt;P&gt;I tried using TOP N to filter a visual I have in order to get the top 5 lowest % values per customer. For some reason Top N Bottom is not working. Sometimes I get more than 5, sometimes less.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I read that a new column can be created using DAX RANKX feature in order to accomplish this, but having trouble getting it to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's what I'd like to do:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Table 'XXX - Local' I want to rank the % values from 'XXX - Local'[% AAN SENT] from worst to best, and then diplay the top 10 worst in matrix table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 20:06:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-new-column-to-get-top-10-customers-with-Lowest/m-p/2130588#M48890</guid>
      <dc:creator>m_roussakis</dc:creator>
      <dc:date>2021-10-12T20:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: RANKX new column to get top 10 customers with Lowest %</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-new-column-to-get-top-10-customers-with-Lowest/m-p/2131047#M48904</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I do not know how your data model looks like, but check the below picture and the attached pbix file.&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;&lt;STRONG&gt;&lt;EM&gt;Top 10 Worst : =&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;EM&gt;VAR _topN = 10&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;VAR _newtable =&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;TOPN ( _topN, ALL ( 'XXX-Local'[Category] ), [Percent AAN SENT :], ASC )&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;RETURN&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;CALCULATE ( [Percent AAN SENT :], KEEPFILTERS ( _newtable ) )&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 03:00:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-new-column-to-get-top-10-customers-with-Lowest/m-p/2131047#M48904</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2021-10-13T03:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: RANKX new column to get top 10 customers with Lowest %</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-new-column-to-get-top-10-customers-with-Lowest/m-p/2133046#M48943</link>
      <description>&lt;P&gt;This works great, thanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One more question: What if in my matrix table I wanted to also show the Top 10 for the next expanded level?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So using your example, lets say 'Ca013' has 10 further sub categories, each with their own %.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to also be able to perform the top 10 function on the next subcategories once the category is expanded in matrix table.&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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 17:30:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-new-column-to-get-top-10-customers-with-Lowest/m-p/2133046#M48943</guid>
      <dc:creator>m_roussakis</dc:creator>
      <dc:date>2021-10-13T17:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: RANKX new column to get top 10 customers with Lowest %</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-new-column-to-get-top-10-customers-with-Lowest/m-p/2133051#M48944</link>
      <description>&lt;P&gt;Hi, can you share your sample pbix file together with describing how you want to see your expected result?&lt;/P&gt;
&lt;P&gt;My sample does not have a sub-category, and sorry that I quite do not understand your question.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 17:34:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-new-column-to-get-top-10-customers-with-Lowest/m-p/2133051#M48944</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2021-10-13T17:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: RANKX new column to get top 10 customers with Lowest %</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-new-column-to-get-top-10-customers-with-Lowest/m-p/2133065#M48945</link>
      <description>&lt;P&gt;Unable to share PBIX...sensitive info. But I can show you what I mean. Example: Category NORTH shows in the Top 5 @ 87.9%:&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 I want to expand NORTH to see subcategories, I also want the same TOP 5 logic to apply to these records:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;As you can see it doesn't.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 17:43:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-new-column-to-get-top-10-customers-with-Lowest/m-p/2133065#M48945</guid>
      <dc:creator>m_roussakis</dc:creator>
      <dc:date>2021-10-13T17:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: RANKX new column to get top 10 customers with Lowest %</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-new-column-to-get-top-10-customers-with-Lowest/m-p/2133117#M48950</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Value AVG top 3 : =&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;EM&gt;VAR topNnumber = 3&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;VAR topNtablecategory =&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;TOPN ( topNnumber, ALL ( Data[Category] ), [Value AVG :], DESC )&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;VAR currentcategory =&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;MAX ( Data[Category] )&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;VAR topNtablesubcategory =&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;TOPN (&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;topNnumber,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;FILTER ( ALL ( Data ), Data[Category] = currentcategory ),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Value AVG :], DESC&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;VAR categorylevel =&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;IF (&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;ISINSCOPE ( Data[Category] ),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;CALCULATE ( [Value AVG :], KEEPFILTERS ( topNtablecategory ) )&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;RETURN&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;IF (&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;ISINSCOPE ( Data[SubCategory] ),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;CALCULATE ( [Value AVG :], KEEPFILTERS ( topNtablesubcategory ) ),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;IF (&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;ISINSCOPE ( Data[Category] ),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;CALCULATE ( [Value AVG :], KEEPFILTERS ( topNtablecategory ) )&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 18:30:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-new-column-to-get-top-10-customers-with-Lowest/m-p/2133117#M48950</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2021-10-13T18:30:09Z</dc:date>
    </item>
  </channel>
</rss>

