<?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 Finding the top manufacturer by total sales in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Finding-the-top-manufacturer-by-total-sales/m-p/3258478#M120408</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I want to get the top manufacturer (the actual name) by total sales. I need a metric Top Manufacturer by Sales that I can use as a KPI in my dashboard.&lt;/P&gt;&lt;P&gt;I have created the metric&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Rank Manufacturer by Sales = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RANKX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Dim Product'&lt;/SPAN&gt;&lt;SPAN&gt;[Manufacturer]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'Fact Sales'&lt;/SPAN&gt;&lt;SPAN&gt;[Total Revenue €]&lt;/SPAN&gt;&lt;SPAN&gt;) and it is working well.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;But then I cannot extract the name corresponding to the rank 1 manufacturer in this metric.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-align-justify"&gt;&lt;SPAN&gt;Can someone help?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 29 May 2023 23:30:36 GMT</pubDate>
    <dc:creator>miguel_tc_27</dc:creator>
    <dc:date>2023-05-29T23:30:36Z</dc:date>
    <item>
      <title>Finding the top manufacturer by total sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Finding-the-top-manufacturer-by-total-sales/m-p/3258478#M120408</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I want to get the top manufacturer (the actual name) by total sales. I need a metric Top Manufacturer by Sales that I can use as a KPI in my dashboard.&lt;/P&gt;&lt;P&gt;I have created the metric&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Rank Manufacturer by Sales = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RANKX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Dim Product'&lt;/SPAN&gt;&lt;SPAN&gt;[Manufacturer]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'Fact Sales'&lt;/SPAN&gt;&lt;SPAN&gt;[Total Revenue €]&lt;/SPAN&gt;&lt;SPAN&gt;) and it is working well.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;But then I cannot extract the name corresponding to the rank 1 manufacturer in this metric.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-align-justify"&gt;&lt;SPAN&gt;Can someone help?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 29 May 2023 23:30:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Finding-the-top-manufacturer-by-total-sales/m-p/3258478#M120408</guid>
      <dc:creator>miguel_tc_27</dc:creator>
      <dc:date>2023-05-29T23:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the top manufacturer by total sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Finding-the-top-manufacturer-by-total-sales/m-p/3258687#M120425</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;I hope the below can provide some ideas on how to create a solution for your datamodel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rank manufacturer by sales: = 
RANK (
    SKIP,
    ALL ( 'Dim Product'[Manufacturer] ),
    ORDERBY ( CALCULATE ( SUM ( 'Fact Sales'[Revenue] ) ), DESC )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rank 1 manufacturer: =
CONCATENATEX (
    FILTER (
        ALL ( 'Dim Product'[Manufacturer] ),
        [Rank manufacturer by sales:] = 1
    ),
    'Dim Product'[Manufacturer],
    ", "
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2023 03:28:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Finding-the-top-manufacturer-by-total-sales/m-p/3258687#M120425</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-05-30T03:28:27Z</dc:date>
    </item>
  </channel>
</rss>

