<?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 total Sales in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-total-Sales/m-p/1256499#M20785</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="180972" data-lia-user-login="arobinson" class="lia-mention lia-mention-user"&gt;arobinson&lt;/a&gt; , not very clear.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can top 10 like this&lt;/P&gt;
&lt;P&gt;Top 10 City Rank = CALCULATE([Sales],TOPN(10,all(Geography[City]),[Sales],DESC),VALUES(Geography[City Id]))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For Rank Refer these links&lt;BR /&gt;&lt;A href="https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures" target="_blank"&gt;https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns" target="_blank"&gt;https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale" target="_blank"&gt;https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jul 2020 15:41:42 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2020-07-28T15:41:42Z</dc:date>
    <item>
      <title>Calculate total Sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-total-Sales/m-p/1256395#M20777</link>
      <description>&lt;P&gt;I have 3 total columns I am working from. Customer, Parent Customer, and amount billed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking to make a table or matrix that pulls the top 10 amount billed for the year. I want this list to be a mix of Customers and Parent Customers, as some of the Customers have Parent Customers and some don't. I want any Customer that have a parent customer to sum up into one name under the Parent Customer. If there is no Parent Customer it will stand alone on the list.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 15:17:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-total-Sales/m-p/1256395#M20777</guid>
      <dc:creator>arobinson</dc:creator>
      <dc:date>2020-07-28T15:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate total Sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-total-Sales/m-p/1256412#M20781</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="180972" data-lia-user-login="arobinson" class="lia-mention lia-mention-user"&gt;arobinson&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can you share some sample data and the expected result as data to have a clear understanding of your question?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;Did I answer your question? Mark this post as a solution, this will help others!.&lt;/P&gt;&lt;P&gt;Click on the Thumbs-Up icon on the right if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;YouTube, &lt;/A&gt;&lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;LinkedIn&lt;/A&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 15:21:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-total-Sales/m-p/1256412#M20781</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2020-07-28T15:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate total Sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-total-Sales/m-p/1256432#M20783</link>
      <description>&lt;P&gt;Customer&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Parent Customer&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Amount Billed&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;No Parent Customer&lt;/TD&gt;&lt;TD&gt;$1033&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;2&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;Parent 1&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;$5121&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Parent 2&lt;/TD&gt;&lt;TD&gt;$5166&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;Parent 2&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;$76621&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;Parent 1&lt;/TD&gt;&lt;TD&gt;$1211&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;No Parent Customer&lt;/TD&gt;&lt;TD&gt;$5151&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;Parent 1&lt;/TD&gt;&lt;TD&gt;$8111&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;Parent 2&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;$51512&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;No Parent Customer&lt;/TD&gt;&lt;TD&gt;$6732&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;No Parent Customer&lt;/TD&gt;&lt;TD&gt;$4445&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 15:26:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-total-Sales/m-p/1256432#M20783</guid>
      <dc:creator>arobinson</dc:creator>
      <dc:date>2020-07-28T15:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate total Sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-total-Sales/m-p/1256499#M20785</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="180972" data-lia-user-login="arobinson" class="lia-mention lia-mention-user"&gt;arobinson&lt;/a&gt; , not very clear.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can top 10 like this&lt;/P&gt;
&lt;P&gt;Top 10 City Rank = CALCULATE([Sales],TOPN(10,all(Geography[City]),[Sales],DESC),VALUES(Geography[City Id]))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For Rank Refer these links&lt;BR /&gt;&lt;A href="https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures" target="_blank"&gt;https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns" target="_blank"&gt;https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale" target="_blank"&gt;https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 15:41:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-total-Sales/m-p/1256499#M20785</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-07-28T15:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate total Sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-total-Sales/m-p/1256581#M20787</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="180972" data-lia-user-login="arobinson" class="lia-mention lia-mention-user"&gt;arobinson&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Create a Hierarchy by dragging the CUSTOMER field on to the PARENT field. Watch this video if necessary (&lt;A href="https://www.youtube.com/watch?v=1Y0T_KkeWyQ" target="_blank" rel="noopener"&gt;https://www.youtube.com/watch?v=1Y0T_KkeWyQ&lt;/A&gt;)&lt;BR /&gt;&lt;BR /&gt;And, add the following measure&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TOP 10 Customers = 

VAR _RANK = 
    RANKX(
      ALL(DATA[Customer]),
        CALCULATE(SUM(DATA[Amount Billed])),,
       DESC
    )
RETURN
IF(
    _RANK &amp;gt; 10,
    BLANK(),
    CALCULATE(SUM(DATA[Amount Billed]))
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;Did I answer your question? Mark this post as a solution, this will help others!.&lt;/P&gt;&lt;P&gt;Click on the Thumbs-Up icon on the right if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;YouTube, &lt;/A&gt;&lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;LinkedIn&lt;/A&gt;&lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 16:08:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-total-Sales/m-p/1256581#M20787</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2020-07-28T16:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate total Sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-total-Sales/m-p/1259597#M20926</link>
      <description>&lt;P&gt;What about creating a calc column called Effective Customer like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Customer&lt;/TD&gt;&lt;TD&gt;Parent Customer&lt;/TD&gt;&lt;TD&gt;Effective Customer&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Cust 1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Cust 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Cust 2&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;Cust 1&lt;/TD&gt;&lt;TD&gt;Cust 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Cust 3&lt;/TD&gt;&lt;TD&gt;Cust 2&lt;/TD&gt;&lt;TD&gt;Cust 2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then slicting by the last column?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 15:30:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-total-Sales/m-p/1259597#M20926</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-29T15:30:09Z</dc:date>
    </item>
  </channel>
</rss>

