<?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: Is there a way to do a subtotal sum? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-there-a-way-to-do-a-subtotal-sum/m-p/710762#M1057</link>
    <description>&lt;P&gt;You're going to want these to be measures and not calculated columns. If you upload some data I can help you out if you want. Onedrive works best.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Jun 2019 18:41:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-06-10T18:41:24Z</dc:date>
    <item>
      <title>Is there a way to do a subtotal sum?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-there-a-way-to-do-a-subtotal-sum/m-p/710734#M1052</link>
      <description>&lt;P&gt;I'm trying to weight a MAPE formula by revenue, but I can't figure out how to just get the subtotal sum of the quantity*revenue (I only want to sum the visible cells which are orders from January to April).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I first created a column that was just Quantity * Revenue:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Quantity*Revenue = [Order Quantity] * [Revenue]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then created a calculated column for the weighted price as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Weighted Price= [Quantity*Revenue] / SUMX('Order Data', [Quantity*Revenue])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then multiplied this by the MAPE as a measure (I already had MAPE as a measure):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;WMAPE: [MAPE] * [Sum of Weighted Price].&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that the SUMX of Weighted Price takes the sum of the entire orders list, not just the visible rows, so the number is extremely small. Is there anyway to get a subtotal sum like you can do in excel?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 18:36:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-there-a-way-to-do-a-subtotal-sum/m-p/710734#M1052</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-10T18:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to do a subtotal sum?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-there-a-way-to-do-a-subtotal-sum/m-p/710743#M1054</link>
      <description>&lt;P&gt;without seeing your data, something like :&lt;/P&gt;&lt;PRE&gt;SUMX( 
    VALUES ( &amp;lt;whatever is on rows&amp;gt;),
   [measure]
)&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Jun 2019 18:07:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-there-a-way-to-do-a-subtotal-sum/m-p/710743#M1054</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-10T18:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to do a subtotal sum?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-there-a-way-to-do-a-subtotal-sum/m-p/710759#M1055</link>
      <description>&lt;P&gt;Here's the data. I want to weight the MAPE by the weighted price column.&lt;/P&gt;&lt;P&gt;Something like: WMAPE:= [MAPE] * [Sum of Weighted Price]&lt;/P&gt;&lt;P&gt;The problem is the [Sum of Weighted Price] includes all the orders, not just the filtered rows. For that column I used:&lt;/P&gt;&lt;P&gt;=[Quantity*Revenue]/SUMX('Orders Data',[Quantity*Revenue])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this makes it more clear! Thanks.&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;</description>
      <pubDate>Mon, 10 Jun 2019 18:35:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-there-a-way-to-do-a-subtotal-sum/m-p/710759#M1055</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-10T18:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to do a subtotal sum?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-there-a-way-to-do-a-subtotal-sum/m-p/710762#M1057</link>
      <description>&lt;P&gt;You're going to want these to be measures and not calculated columns. If you upload some data I can help you out if you want. Onedrive works best.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 18:41:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-there-a-way-to-do-a-subtotal-sum/m-p/710762#M1057</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-10T18:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to do a subtotal sum?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-there-a-way-to-do-a-subtotal-sum/m-p/710774#M1059</link>
      <description>&lt;P&gt;Not sure how to upload files on here but I created a measure Q*R:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Q*R:=SUMX('Orders Data',[Order Quantity])*SUMX('Orders Data',[Revenue])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would I make a measure instead of the weighted price column? I tried:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Weighted Price :=[Q*R]/SUMX('Orders Data',[Q*R])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but that gave me a total of 906.76 (I want the total to be 1)&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 19:00:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-there-a-way-to-do-a-subtotal-sum/m-p/710774#M1059</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-10T19:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to do a subtotal sum?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-there-a-way-to-do-a-subtotal-sum/m-p/710836#M1062</link>
      <description>&lt;P&gt;you can upload an excel file or power bi file using Onedrive or dropbox and then posting the link here. Would be much much easier to see what you are working with here.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 20:27:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-there-a-way-to-do-a-subtotal-sum/m-p/710836#M1062</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-10T20:27:16Z</dc:date>
    </item>
  </channel>
</rss>

