<?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 CALCULATE with FILTER by Row Grouping in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CALCULATE-with-FILTER-by-Row-Grouping/m-p/2051619#M46162</link>
    <description>&lt;P&gt;I've got this DAX that produces the correct result for the total quantity from 3 months previous.&amp;nbsp; However, when I drag Transaction Type into my table, I still get that total result, but I was expecting to now see that total carved up by Transaction Type.&amp;nbsp; What do I modify to get this to behave appropriately?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Ordered Qty Prev 3 Months Total TEST =
VAR __PREV_MONTH =
    EOMONTH (
        MAX ( 'Supply_Chain Orders'[Ship Date] ),
        -1
    )
VAR __PREV_MONTH3 =
    EOMONTH (
        MAX ( 'Supply_Chain Orders'[Ship Date] ),
        -4
    )
RETURN
    CALCULATE (
        SUM ( 'Supply_Chain Orders'[Ordered Quantity] ),
        FILTER (
            ALL ( 'Supply_Chain Orders' ),
            'Supply_Chain Orders'[Ship Date].[Date] &amp;gt; __PREV_MONTH3
                &amp;amp;&amp;amp; 'Supply_Chain Orders'[Ship Date].[Date] &amp;lt;= __PREV_MONTH
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Sep 2021 14:28:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-09-01T14:28:26Z</dc:date>
    <item>
      <title>CALCULATE with FILTER by Row Grouping</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CALCULATE-with-FILTER-by-Row-Grouping/m-p/2051619#M46162</link>
      <description>&lt;P&gt;I've got this DAX that produces the correct result for the total quantity from 3 months previous.&amp;nbsp; However, when I drag Transaction Type into my table, I still get that total result, but I was expecting to now see that total carved up by Transaction Type.&amp;nbsp; What do I modify to get this to behave appropriately?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Ordered Qty Prev 3 Months Total TEST =
VAR __PREV_MONTH =
    EOMONTH (
        MAX ( 'Supply_Chain Orders'[Ship Date] ),
        -1
    )
VAR __PREV_MONTH3 =
    EOMONTH (
        MAX ( 'Supply_Chain Orders'[Ship Date] ),
        -4
    )
RETURN
    CALCULATE (
        SUM ( 'Supply_Chain Orders'[Ordered Quantity] ),
        FILTER (
            ALL ( 'Supply_Chain Orders' ),
            'Supply_Chain Orders'[Ship Date].[Date] &amp;gt; __PREV_MONTH3
                &amp;amp;&amp;amp; 'Supply_Chain Orders'[Ship Date].[Date] &amp;lt;= __PREV_MONTH
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 14:28:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CALCULATE-with-FILTER-by-Row-Grouping/m-p/2051619#M46162</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-01T14:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: CALCULATE with FILTER by Row Grouping</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CALCULATE-with-FILTER-by-Row-Grouping/m-p/2051672#M46164</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can you try this :&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Ordered Qty Prev 3 Months Total TEST =
VAR __PREV_MONTH =
    EOMONTH ( MAX ( 'Supply_Chain Orders'[Ship Date] ), -1 )
VAR __PREV_MONTH3 =
    EOMONTH ( MAX ( 'Supply_Chain Orders'[Ship Date] ), -4 )
RETURN
    CALCULATE (
        SUM ( 'Supply_Chain Orders'[Ordered Quantity] ),
        FILTER (
            ALL ( 'Supply_Chain Orders'[Ship Date].[Date] ),
            'Supply_Chain Orders'[Ship Date].[Date] &amp;gt; __PREV_MONTH3
                &amp;amp;&amp;amp; 'Supply_Chain Orders'[Ship Date].[Date] &amp;lt;= __PREV_MONTH
        )
    )
&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 01 Sep 2021 14:43:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CALCULATE-with-FILTER-by-Row-Grouping/m-p/2051672#M46164</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2021-09-01T14:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: CALCULATE with FILTER by Row Grouping</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CALCULATE-with-FILTER-by-Row-Grouping/m-p/2051745#M46171</link>
      <description>&lt;P&gt;Thanks!&amp;nbsp; ALL function had to be on specific column, not on whole table.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 15:19:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CALCULATE-with-FILTER-by-Row-Grouping/m-p/2051745#M46171</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-01T15:19:04Z</dc:date>
    </item>
  </channel>
</rss>

