<?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: Subtotal should give sumproduct result. How to create the formula in Power BI in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotal-should-give-sumproduct-result-How-to-create-the-formula/m-p/773964#M3818</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;sorry, yeasterday I was busy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;I added a screenshot. I tried to enter it as a formula with "new measure". Probably you had something other in mind where to insert the code? Marcus&lt;/P&gt;</description>
    <pubDate>Fri, 23 Aug 2019 07:27:35 GMT</pubDate>
    <dc:creator>Marcus709</dc:creator>
    <dc:date>2019-08-23T07:27:35Z</dc:date>
    <item>
      <title>Subtotal should give sumproduct result. How to create the formula in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotal-should-give-sumproduct-result-How-to-create-the-formula/m-p/770985#M3697</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a serious problem in dealing with the results of&amp;nbsp; a user defined formula on the subtotal level.&amp;nbsp; The values there are simply the sum of the individual values of the grouped (subtotal) entries.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I will be more specific: I added two screenshots (one excel, one Power BI) for a better illustration .&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table: tabelle1&lt;/P&gt;&lt;P&gt;units: units&lt;/P&gt;&lt;P&gt;price: price&lt;/P&gt;&lt;P&gt;artname: the individual names of articles (here: pet names)&lt;/P&gt;&lt;P&gt;sold: units x price&lt;/P&gt;&lt;P&gt;avgprice: sold/units.&lt;/P&gt;&lt;P&gt;For “avgprice” the sumproduct (sold/units) should give me the wanted results for subtotals, too. But this only works in excel-pivot, not in power BI. Instead of the proper result 5,66 I get&amp;nbsp; 16,99 in Power BI for "type1".&lt;/P&gt;&lt;P&gt;I hope someone has a helping idea&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Marcus&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 14:08:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotal-should-give-sumproduct-result-How-to-create-the-formula/m-p/770985#M3697</guid>
      <dc:creator>Marcus709</dc:creator>
      <dc:date>2019-08-20T14:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal should give sumproduct result. How to create the formula in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotal-should-give-sumproduct-result-How-to-create-the-formula/m-p/771304#M3705</link>
      <description>&lt;PRE&gt;[Total Sales] =
	sumx (
		tabelle1,
		tabelle1[sold] * tabelle1[units]
	)

[Total Units] = sum ( tabelle1[units] )
	
[Average Price] =
var __sales = [Total Sales]
var __units = [Total Units]
var __avg = divide( __sales, __units)
return
	__avg&lt;/PRE&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;Darek&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 00:43:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotal-should-give-sumproduct-result-How-to-create-the-formula/m-p/771304#M3705</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-21T00:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal should give sumproduct result. How to create the formula in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotal-should-give-sumproduct-result-How-to-create-the-formula/m-p/771970#M3738</link>
      <description>&lt;P&gt;Hi Darek,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;at first thanks.&lt;/P&gt;&lt;P&gt;I created the new measures "total sales" and "total units".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But sorry, I don´t get the last part.&amp;nbsp; If I try to put it as one new measure [Average Price] as a formula&amp;nbsp;in one line of the editor, I get a syntax warning.&amp;nbsp;Can you please explain a little further?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Marcus&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 14:13:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotal-should-give-sumproduct-result-How-to-create-the-formula/m-p/771970#M3738</guid>
      <dc:creator>Marcus709</dc:creator>
      <dc:date>2019-08-21T14:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal should give sumproduct result. How to create the formula in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotal-should-give-sumproduct-result-How-to-create-the-formula/m-p/772233#M3742</link>
      <description>I can't see a picture of this warning...&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D.</description>
      <pubDate>Wed, 21 Aug 2019 17:59:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotal-should-give-sumproduct-result-How-to-create-the-formula/m-p/772233#M3742</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-21T17:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal should give sumproduct result. How to create the formula in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotal-should-give-sumproduct-result-How-to-create-the-formula/m-p/773964#M3818</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;sorry, yeasterday I was busy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;I added a screenshot. I tried to enter it as a formula with "new measure". Probably you had something other in mind where to insert the code? Marcus&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 07:27:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotal-should-give-sumproduct-result-How-to-create-the-formula/m-p/773964#M3818</guid>
      <dc:creator>Marcus709</dc:creator>
      <dc:date>2019-08-23T07:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal should give sumproduct result. How to create the formula in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotal-should-give-sumproduct-result-How-to-create-the-formula/m-p/773974#M3819</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 07:32:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotal-should-give-sumproduct-result-How-to-create-the-formula/m-p/773974#M3819</guid>
      <dc:creator>Marcus709</dc:creator>
      <dc:date>2019-08-23T07:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal should give sumproduct result. How to create the formula in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotal-should-give-sumproduct-result-How-to-create-the-formula/m-p/774125#M3827</link>
      <description>Why are you not formatting your code PROPERLY? No wonder you can't get this right... A formula should be well formatted and not entered as a simple stream of characters... Please go to &lt;A href="https://www.sqlbi.com/articles/rules-for-dax-code-formatting/" target="_blank"&gt;https://www.sqlbi.com/articles/rules-for-dax-code-formatting/&lt;/A&gt; and learn to write good code. In the editor you obtain a new line by pressing SHIFT+Enter (or CTRL+Enter).&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D.</description>
      <pubDate>Fri, 23 Aug 2019 09:30:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotal-should-give-sumproduct-result-How-to-create-the-formula/m-p/774125#M3827</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-23T09:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal should give sumproduct result. How to create the formula in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotal-should-give-sumproduct-result-How-to-create-the-formula/m-p/774149#M3829</link>
      <description>&lt;P&gt;...Now you find it in the formatted way. Can you tell me, where the problem still lies?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 09:52:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotal-should-give-sumproduct-result-How-to-create-the-formula/m-p/774149#M3829</guid>
      <dc:creator>Marcus709</dc:creator>
      <dc:date>2019-08-23T09:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal should give sumproduct result. How to create the formula in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotal-should-give-sumproduct-result-How-to-create-the-formula/m-p/774240#M3831</link>
      <description>These are 3 different measures. You cannot enter them all in one go. Each measure must be entered on its own.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;Darek</description>
      <pubDate>Fri, 23 Aug 2019 11:54:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotal-should-give-sumproduct-result-How-to-create-the-formula/m-p/774240#M3831</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-23T11:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal should give sumproduct result. How to create the formula in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotal-should-give-sumproduct-result-How-to-create-the-formula/m-p/775868#M3933</link>
      <description>&lt;P&gt;Thanks a lot. That´s it.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 15:32:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotal-should-give-sumproduct-result-How-to-create-the-formula/m-p/775868#M3933</guid>
      <dc:creator>Marcus709</dc:creator>
      <dc:date>2019-08-26T15:32:21Z</dc:date>
    </item>
  </channel>
</rss>

