<?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: Getting top category from a subset of values instead of the whole column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-top-category-from-a-subset-of-values-instead-of-the/m-p/2990212#M100577</link>
    <description>&lt;P&gt;That returns me the top sum of money, but how can I get the "line of business" that has the most total money out of the top 4 companies in that list?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Dec 2022 13:26:38 GMT</pubDate>
    <dc:creator>RandomWombsis</dc:creator>
    <dc:date>2022-12-27T13:26:38Z</dc:date>
    <item>
      <title>Getting top category from a subset of values instead of the whole column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-top-category-from-a-subset-of-values-instead-of-the/m-p/2985301#M100158</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I have a list of companies (company_name) and their money amounts. I also have the line of business that the companies are in.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to show (in a card) that line of business that has the most total money out of the top 4 companies listed here.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Note:&lt;BR /&gt;This would be easily achieved using top filter if the requirement was to show the top line of business out of the whole data. That would in this case be "siivous" as its money totals to 12000 which is more than any other category.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;However what I need is to dynamically get a "subset of top 4 companies" AND then take top category out of those.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would in this example result in "it-ala" being the biggest line of business out of that subset with 10000 as money amount.&lt;BR /&gt;&lt;BR /&gt;Can this be achieved in any way?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 23:11:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-top-category-from-a-subset-of-values-instead-of-the/m-p/2985301#M100158</guid>
      <dc:creator>RandomWombsis</dc:creator>
      <dc:date>2022-12-22T23:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: Getting top category from a subset of values instead of the whole column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-top-category-from-a-subset-of-values-instead-of-the/m-p/2985685#M100181</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="490492" data-lia-user-login="RandomWombsis" class="lia-mention lia-mention-user"&gt;RandomWombsis&lt;/a&gt; , do need TOP one based on two columns &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2 column top N = CALCULATE([Sum of Money], TOPN(1, SUMMARIZE(ALLSELECTED('Table'), 'Table'[Line of business], 'Table'[Company]), [Sum of Money],DESC),VALUES('Table'[Line of business]), VALUES('Table'[Company]) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;maxx( TOPN(1, SUMMARIZE(ALLSELECTED('Table'), 'Table'[Line of business], 'Table'[Company]), [Sum of Money],DESC),VALUES('Table'[Line of business]),[Company])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Concatenatex( TOPN(1, SUMMARIZE(ALLSELECTED('Table'), 'Table'[Line of business], 'Table'[Company]), [Sum of Money],DESC),VALUES('Table'[Line of business]),[Company] || '-' || [Line of business])&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 04:11:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-top-category-from-a-subset-of-values-instead-of-the/m-p/2985685#M100181</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-12-23T04:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Getting top category from a subset of values instead of the whole column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-top-category-from-a-subset-of-values-instead-of-the/m-p/2985686#M100182</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="490492" data-lia-user-login="RandomWombsis" class="lia-mention lia-mention-user"&gt;RandomWombsis&lt;/a&gt; , do need TOP one based on two columns &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2 column top N = CALCULATE([Sum of Money], TOPN(1, SUMMARIZE(ALLSELECTED('Table'), 'Table'[Line of business], 'Table'[Company]), [Sum of Money],DESC),VALUES('Table'[Line of business]), VALUES('Table'[Company]) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;maxx( TOPN(1, SUMMARIZE(ALLSELECTED('Table'), 'Table'[Line of business], 'Table'[Company]), [Sum of Money],DESC),VALUES('Table'[Line of business]),[Company])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Concatenatex( TOPN(1, SUMMARIZE(ALLSELECTED('Table'), 'Table'[Line of business], 'Table'[Company]), [Sum of Money],DESC),VALUES('Table'[Line of business]),[Company] || '-' || [Line of business])&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 04:11:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-top-category-from-a-subset-of-values-instead-of-the/m-p/2985686#M100182</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-12-23T04:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Getting top category from a subset of values instead of the whole column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-top-category-from-a-subset-of-values-instead-of-the/m-p/2990212#M100577</link>
      <description>&lt;P&gt;That returns me the top sum of money, but how can I get the "line of business" that has the most total money out of the top 4 companies in that list?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2022 13:26:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-top-category-from-a-subset-of-values-instead-of-the/m-p/2990212#M100577</guid>
      <dc:creator>RandomWombsis</dc:creator>
      <dc:date>2022-12-27T13:26:38Z</dc:date>
    </item>
  </channel>
</rss>

