<?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: Getting previous 3MMA in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-previous-3MMA/m-p/2471103#M67284</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="357960" data-lia-user-login="Easley06" class="lia-mention lia-mention-user"&gt;Easley06&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please enable the &lt;A href="https://docs.microsoft.com/en-gb/power-bi/transform-model/desktop-auto-date-time" target="_blank" rel="noopener"&gt;Time &lt;/A&gt;&lt;SPAN&gt;&lt;A href="https://docs.microsoft.com/en-gb/power-bi/transform-model/desktop-auto-date-time" target="_blank" rel="noopener"&gt;Intelligence&lt;/A&gt;. This will let the data column has Date Hierarchy.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a measure via the expression below.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
CALCULATE (
    AVERAGE ( 'Table'[Values] ),
    FILTER ( 'Table', [Date] &amp;gt;= DATE(YEAR(TODAY()),MONTH(TODAY())-5,1) )
)
&lt;/LI-CODE&gt;
&lt;P&gt;This measure will filter the context and if the context have no rows match the condition, it will return blank.&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Pbix in the end you can refer.&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ chenwu zhu&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Fri, 22 Apr 2022 09:29:31 GMT</pubDate>
    <dc:creator>v-chenwuz-msft</dc:creator>
    <dc:date>2022-04-22T09:29:31Z</dc:date>
    <item>
      <title>Getting previous 3MMA</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-previous-3MMA/m-p/2464643#M66934</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can someone help me to figure out how to get this?&lt;/P&gt;&lt;P&gt;currently i have 3MMA but how to get Jan 2022 and Nov, Dec 2021&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;measure for 3mma&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;3MMA SOM = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;AVERAGEX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;values&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;mv_fact_sales_aggr[MonthYear]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;[SOM]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;DATESINPERIOD&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;mv_fact_sales_aggr[date]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;LASTDATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;mv_fact_sales_aggr[date]&lt;/SPAN&gt;&lt;SPAN&gt;),-&lt;/SPAN&gt;&lt;SPAN&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;MONTH&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 20 Apr 2022 06:10:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-previous-3MMA/m-p/2464643#M66934</guid>
      <dc:creator>Easley06</dc:creator>
      <dc:date>2022-04-20T06:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Getting previous 3MMA</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-previous-3MMA/m-p/2464673#M66935</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="357960" data-lia-user-login="Easley06" class="lia-mention lia-mention-user"&gt;Easley06&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doupt it works properly without Date table but you may try&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Previous 3MMA SOM =
CALCULATE (
    AVERAGEX ( VALUES ( mv_fact_sales_aggr[MonthYear] ), [SOM] ),
    DATESINPERIOD (
        mv_fact_sales_aggr[date],
        DATEADD ( LASTDATE ( mv_fact_sales_aggr[date] ), -3, MONTH ),
        -3,
        MONTH
    )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 20 Apr 2022 02:49:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-previous-3MMA/m-p/2464673#M66935</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-20T02:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: Getting previous 3MMA</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-previous-3MMA/m-p/2464698#M66937</link>
      <description>&lt;P&gt;it works but i have year for 2022 and i want to get also the Nov , Dec 2021 and Jan 2022 is it possible?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 03:05:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-previous-3MMA/m-p/2464698#M66937</guid>
      <dc:creator>Easley06</dc:creator>
      <dc:date>2022-04-20T03:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: Getting previous 3MMA</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-previous-3MMA/m-p/2464714#M66938</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="357960" data-lia-user-login="Easley06" class="lia-mention lia-mention-user"&gt;Easley06&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Sorry, can you please clarify further?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 03:15:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-previous-3MMA/m-p/2464714#M66938</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-20T03:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: Getting previous 3MMA</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-previous-3MMA/m-p/2464896#M66947</link>
      <description>&lt;P&gt;Hi sir,&lt;/P&gt;&lt;P&gt;what i mean is i have 2022 data whice has 4months and i like to get also the previous 3MMA&lt;/P&gt;&lt;P&gt;currently the measure you gave only works if quarter is complete&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;would like to get the jan 2022 , Dec and nov 2021&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 06:08:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-previous-3MMA/m-p/2464896#M66947</guid>
      <dc:creator>Easley06</dc:creator>
      <dc:date>2022-04-20T06:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: Getting previous 3MMA</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-previous-3MMA/m-p/2464949#M66953</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="357960" data-lia-user-login="Easley06" class="lia-mention lia-mention-user"&gt;Easley06&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any chance you can share sample file?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 06:41:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-previous-3MMA/m-p/2464949#M66953</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-20T06:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Getting previous 3MMA</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-previous-3MMA/m-p/2471103#M67284</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="357960" data-lia-user-login="Easley06" class="lia-mention lia-mention-user"&gt;Easley06&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please enable the &lt;A href="https://docs.microsoft.com/en-gb/power-bi/transform-model/desktop-auto-date-time" target="_blank" rel="noopener"&gt;Time &lt;/A&gt;&lt;SPAN&gt;&lt;A href="https://docs.microsoft.com/en-gb/power-bi/transform-model/desktop-auto-date-time" target="_blank" rel="noopener"&gt;Intelligence&lt;/A&gt;. This will let the data column has Date Hierarchy.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a measure via the expression below.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
CALCULATE (
    AVERAGE ( 'Table'[Values] ),
    FILTER ( 'Table', [Date] &amp;gt;= DATE(YEAR(TODAY()),MONTH(TODAY())-5,1) )
)
&lt;/LI-CODE&gt;
&lt;P&gt;This measure will filter the context and if the context have no rows match the condition, it will return blank.&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Pbix in the end you can refer.&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ chenwu zhu&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 09:29:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-previous-3MMA/m-p/2471103#M67284</guid>
      <dc:creator>v-chenwuz-msft</dc:creator>
      <dc:date>2022-04-22T09:29:31Z</dc:date>
    </item>
  </channel>
</rss>

