<?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: SUM Filtered in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-Filtered/m-p/1262799#M21079</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;- I can't make heads or tails of that formula because it doesn't seem to relate back to the sample data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With your sample data as reference, if you have "Fruit" in a visual, you could do this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
  VAR __Fruit = MAX('Table'[Fruit])
RETURN
  SUMX(FILTER(ALL('Table'),'Table'[Fruit] = __Fruit),[Cost])

or

Measure =
  VAR __Fruit = MAX('Table'[Fruit])
RETURN
  CALCULATE(SUM('Table'[Cost]),FILTER(ALL('Table'),'Table'[Fruit]=__Fruit))&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 30 Jul 2020 16:20:18 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2020-07-30T16:20:18Z</dc:date>
    <item>
      <title>SUM Filtered</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-Filtered/m-p/1262746#M21074</link>
      <description>&lt;P&gt;Hey, I'm stuck on something I think should be simple but im going a bit mad getting there. I want to sum a total of everything in a table, where column A = the value of the current row. So if column A contains Apples, and column B contains costs of Applies, i want a column that shows the total costs of all rows of Apples&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fruit&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Cost&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Subtotal&lt;/P&gt;&lt;P&gt;Apple&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;&lt;P&gt;Apple&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;&lt;P&gt;Banana&amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;&lt;P&gt;Orange&amp;nbsp; &amp;nbsp; 4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, i want it to show the full subtotal, regardless of if the table is filtered. The table is being filtered by other measures on the same table I've tried ALL/ALLEXCEPT, and it seems to repeat every row on the table, even when filtered by Apple. What am i missing please?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 15:56:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-Filtered/m-p/1262746#M21074</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-30T15:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: SUM Filtered</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-Filtered/m-p/1262756#M21075</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;- So generally you are going to use SUMX(FILTER('Table'), [Column] = "Something"),[Value]) or CALCULATE(SUM('Table'[Value]),FILTER('Table',[Column] = "Something"))&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 15:58:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-Filtered/m-p/1262756#M21075</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-07-30T15:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: SUM Filtered</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-Filtered/m-p/1262778#M21077</link>
      <description>&lt;P&gt;Thanks Greg. The problem I have is getting it to ignore existing filters. I tried this, but it seems to just think forever as soon as i add the all()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;POAccrualValue = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR REMARK = SELECTEDVALUE('Account Items (F0911)'[Name - Remark Explanation])&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('Account Items (F0911)'[AccountItemValue],FILTER(all('Account Items (F0911)'),'Account Items (F0911)'[Name - Remark Explanation]=REMARK))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 30 Jul 2020 16:08:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-Filtered/m-p/1262778#M21077</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-30T16:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: SUM Filtered</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-Filtered/m-p/1262799#M21079</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;- I can't make heads or tails of that formula because it doesn't seem to relate back to the sample data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With your sample data as reference, if you have "Fruit" in a visual, you could do this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
  VAR __Fruit = MAX('Table'[Fruit])
RETURN
  SUMX(FILTER(ALL('Table'),'Table'[Fruit] = __Fruit),[Cost])

or

Measure =
  VAR __Fruit = MAX('Table'[Fruit])
RETURN
  CALCULATE(SUM('Table'[Cost]),FILTER(ALL('Table'),'Table'[Fruit]=__Fruit))&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 30 Jul 2020 16:20:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-Filtered/m-p/1262799#M21079</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-07-30T16:20:18Z</dc:date>
    </item>
  </channel>
</rss>

