<?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: Calculate top 6 clients in descending order in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-top-6-clients-in-descending-order/m-p/4758023#M182192</link>
    <description>&lt;P&gt;Hi all, just to give some context. Im looking for the top 2 Clients here based on sales and want to get the percentage based on the overall volume and sales amount&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1287762" data-lia-user-login="FBergamaschi" class="lia-mention lia-mention-user"&gt;FBergamaschi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
    <pubDate>Wed, 09 Jul 2025 21:07:26 GMT</pubDate>
    <dc:creator>gra_197</dc:creator>
    <dc:date>2025-07-09T21:07:26Z</dc:date>
    <item>
      <title>Calculate top 6 clients in descending order</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-top-6-clients-in-descending-order/m-p/4757802#M182182</link>
      <description>&lt;P class="lia-align-center"&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am hoping you can help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to get a list of top 6 clients based on the highest sales volume&lt;/P&gt;&lt;P&gt;Secondly I want to get an average of the volume of these clients over the total client volume by sales&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;G&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 13:35:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-top-6-clients-in-descending-order/m-p/4757802#M182182</guid>
      <dc:creator>gra_197</dc:creator>
      <dc:date>2025-07-09T13:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate top 6 clients in descending order</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-top-6-clients-in-descending-order/m-p/4757817#M182184</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;without tables, model etc the only thing we can do is give you the DAX code&amp;nbsp; of a generic measure for the Sales of the top 6 customers based on sales itself&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Sales Top6 =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;Top&lt;/SPAN&gt;&lt;SPAN&gt;= &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;TOPN&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;6&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;( Cust[Custkey]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;), &lt;/SPAN&gt;&lt;SPAN&gt;[Sales]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;DESC&lt;/SPAN&gt;&lt;SPAN&gt;)&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;SUMX&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;KEEPFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Top&lt;/SPAN&gt;&lt;SPAN&gt;), [Sales]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The second question in unclear to me, can you rephrase it and show an example?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;If this helped, please consider giving kudos and mark as a solution&lt;/P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="273" data-lia-user-login="me" class="lia-mention lia-mention-user"&gt;me&lt;/a&gt; in replies or I'll lose your thread&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;consider voting &lt;A href="https://community.fabric.microsoft.com/t5/Fabric-Ideas/Power-BI-Filter-Pane-as-an-icon-on-the-right-side-bar-in-on/idi-p/4728588" target="_blank"&gt;this Power BI idea&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Francesco Bergamaschi&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;MBA, M.Eng, M.Econ, Professor of BI&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 09 Jul 2025 13:39:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-top-6-clients-in-descending-order/m-p/4757817#M182184</guid>
      <dc:creator>FBergamaschi</dc:creator>
      <dc:date>2025-07-09T13:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate top 6 clients in descending order</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-top-6-clients-in-descending-order/m-p/4757981#M182190</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure how your semantic model 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;&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;&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;A href="https://learn.microsoft.com/es-es/dax/window-function-dax?wt.mc_id=DP-MVP-5004989" target="_blank"&gt;función WINDOW (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sales: = 
SUM( sales[sales] )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sales top 6 clients: = 
CALCULATE (
    [Sales:],
    KEEPFILTERS (
        WINDOW (
            1,
            ABS,
            6,
            ABS,
            ALL ( customer[customer] ),
            ORDERBY ( [Sales:], DESC )
        )
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Average sales top 6 clients: = 
IF (
    [Sales top 6 clients:],
    AVERAGEX ( ALL ( customer[customer] ), [Sales top 6 clients:] )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 16:48:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-top-6-clients-in-descending-order/m-p/4757981#M182190</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2025-07-09T16:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate top 6 clients in descending order</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-top-6-clients-in-descending-order/m-p/4758023#M182192</link>
      <description>&lt;P&gt;Hi all, just to give some context. Im looking for the top 2 Clients here based on sales and want to get the percentage based on the overall volume and sales amount&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1287762" data-lia-user-login="FBergamaschi" class="lia-mention lia-mention-user"&gt;FBergamaschi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 21:07:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-top-6-clients-in-descending-order/m-p/4758023#M182192</guid>
      <dc:creator>gra_197</dc:creator>
      <dc:date>2025-07-09T21:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate top 6 clients in descending order</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-top-6-clients-in-descending-order/m-p/4758466#M182214</link>
      <description>&lt;P&gt;Hi&amp;nbsp;, Thank you for reaching out to the Microsoft Community Forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To help you identify your top clients and measure their impact on your overall sales, we built a Power BI report using two tables based on the details provided by you: Customers and Sales, connected by a relationship on CustKey. We created DAX measures to calculate total sales, the combined sales of your top 2 clients and the percentage those top clients contribute to the total. This gives you a clear view of who your highest-value clients are and what share of your revenue they represent.&lt;BR /&gt;&lt;BR /&gt;Please check the attached .pbix file and share your thoughts.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 06:23:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-top-6-clients-in-descending-order/m-p/4758466#M182214</guid>
      <dc:creator>v-hashadapu</dc:creator>
      <dc:date>2025-07-10T06:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate top 6 clients in descending order</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-top-6-clients-in-descending-order/m-p/4759044#M182241</link>
      <description>&lt;P&gt;Thanks for the&amp;nbsp;@ so I would come back&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Supponsing you have a Sales measure ( [Sales] )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Sales Top 2&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;Top2Cust&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;TOPN&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;( Customer[Custkey]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;), &lt;/SPAN&gt;&lt;SPAN&gt;[Sales]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;DESC&lt;/SPAN&gt;&lt;SPAN&gt;)&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;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;[Sales]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;KEEPFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;Top2Cust&lt;/SPAN&gt;&lt;SPAN&gt;) )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Sales Top 2 Pct = DIVIDE ( [Sales Top 2], [Sales] )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;If this helped, please consider giving kudos and mark as a solution&lt;/P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="273" data-lia-user-login="me" class="lia-mention lia-mention-user"&gt;me&lt;/a&gt; in replies or I'll lose your thread&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;consider voting &lt;A href="https://community.fabric.microsoft.com/t5/Fabric-Ideas/Power-BI-Filter-Pane-as-an-icon-on-the-right-side-bar-in-on/idi-p/4728588" target="_blank"&gt;this Power BI idea&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Francesco Bergamaschi&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;MBA, M.Eng, M.Econ, Professor of BI&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 10 Jul 2025 13:42:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-top-6-clients-in-descending-order/m-p/4759044#M182241</guid>
      <dc:creator>FBergamaschi</dc:creator>
      <dc:date>2025-07-10T13:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate top 6 clients in descending order</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-top-6-clients-in-descending-order/m-p/4760914#M182312</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1254366" data-lia-user-login="gra_197" class="lia-mention lia-mention-user"&gt;gra_197&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is mine or somebody else's answer a solution?&lt;/P&gt;&lt;P&gt;If this helped, please consider giving kudos and mark as a solution&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;@me in replies or I'll lose your thread&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;consider voting &lt;A href="https://community.fabric.microsoft.com/t5/Fabric-Ideas/Power-BI-Filter-Pane-as-an-icon-on-the-right-side-bar-in-on/idi-p/4728588" target="_blank"&gt;this Power BI idea&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Francesco Bergamaschi&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;MBA, M.Eng, M.Econ, Professor of BI&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jul 2025 07:22:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-top-6-clients-in-descending-order/m-p/4760914#M182312</guid>
      <dc:creator>FBergamaschi</dc:creator>
      <dc:date>2025-07-13T07:22:33Z</dc:date>
    </item>
  </channel>
</rss>

