<?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 Count then multiply in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-then-multiply/m-p/1522531#M29742</link>
    <description>&lt;P&gt;I have 2 tables 1:many&amp;nbsp;&lt;/P&gt;&lt;P&gt;The sales table which only has the units sold...&amp;nbsp; so each row counts as a sale...&amp;nbsp; the sales table doesn't have a quantity column&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My product table has the product key which exist in the sales table as well&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to count the number of units per product key and then multiply it by the price of each product key from my product table&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doing the total sales by unit must be done with count as I can't use sum&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can get the count but am struggling to get the revenue with the multiply&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 29 Nov 2020 16:13:23 GMT</pubDate>
    <dc:creator>JimmyHussein</dc:creator>
    <dc:date>2020-11-29T16:13:23Z</dc:date>
    <item>
      <title>Count then multiply</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-then-multiply/m-p/1522531#M29742</link>
      <description>&lt;P&gt;I have 2 tables 1:many&amp;nbsp;&lt;/P&gt;&lt;P&gt;The sales table which only has the units sold...&amp;nbsp; so each row counts as a sale...&amp;nbsp; the sales table doesn't have a quantity column&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My product table has the product key which exist in the sales table as well&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to count the number of units per product key and then multiply it by the price of each product key from my product table&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doing the total sales by unit must be done with count as I can't use sum&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can get the count but am struggling to get the revenue with the multiply&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Nov 2020 16:13:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-then-multiply/m-p/1522531#M29742</guid>
      <dc:creator>JimmyHussein</dc:creator>
      <dc:date>2020-11-29T16:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: Count then multiply</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-then-multiply/m-p/1522621#M29750</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SUMX(productsTable,productsTable[price] * CALCULATE(COUNTROWS(SalesTable)))&lt;/P&gt;</description>
      <pubDate>Sun, 29 Nov 2020 19:51:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-then-multiply/m-p/1522621#M29750</guid>
      <dc:creator>MattAllington</dc:creator>
      <dc:date>2020-11-29T19:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Count then multiply</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-then-multiply/m-p/1522755#M29752</link>
      <description>&lt;P&gt;=sumx(producttable,producttable[price]*calcuate(sum(salestable[quantity])))&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 00:49:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-then-multiply/m-p/1522755#M29752</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2020-11-30T00:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: Count then multiply</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-then-multiply/m-p/1523105#M29761</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="273247" data-lia-user-login="JimmyHussein" class="lia-mention lia-mention-user"&gt;JimmyHussein&lt;/a&gt; , Try like&lt;/P&gt;
&lt;P&gt;sumx(summarize(product, "_1",calcuate(sum(sales[quantity])) , "_2",calcuate(sum(product[price]))), [_1]*[_2])&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 04:06:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-then-multiply/m-p/1523105#M29761</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-11-30T04:06:57Z</dc:date>
    </item>
  </channel>
</rss>

