<?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 the average of the first 3 months from last 6 months in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-average-of-the-first-3-months-from-last-6-months/m-p/3361595#M126384</link>
    <description>&lt;P&gt;Hello&lt;BR /&gt;I'm tring to calculate the average of the first 3 months going back 6 months , in the below example and if we pick January&lt;BR /&gt;I need to return 6 months and from that period I need to calculate the&amp;nbsp;average of the fist 3 months of this period of 6 months&lt;BR /&gt;So for January I need the average of (July,&amp;nbsp; August and September) , etc as below&lt;BR /&gt;&lt;BR /&gt;Any tips ?&lt;BR /&gt;Appreciated&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Aug 2023 11:35:00 GMT</pubDate>
    <dc:creator>pmargari</dc:creator>
    <dc:date>2023-08-02T11:35:00Z</dc:date>
    <item>
      <title>Calculate the average of the first 3 months from last 6 months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-average-of-the-first-3-months-from-last-6-months/m-p/3361595#M126384</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;I'm tring to calculate the average of the first 3 months going back 6 months , in the below example and if we pick January&lt;BR /&gt;I need to return 6 months and from that period I need to calculate the&amp;nbsp;average of the fist 3 months of this period of 6 months&lt;BR /&gt;So for January I need the average of (July,&amp;nbsp; August and September) , etc as below&lt;BR /&gt;&lt;BR /&gt;Any tips ?&lt;BR /&gt;Appreciated&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2023 11:35:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-average-of-the-first-3-months-from-last-6-months/m-p/3361595#M126384</guid>
      <dc:creator>pmargari</dc:creator>
      <dc:date>2023-08-02T11:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the average of the first 3 months from last 6 months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-average-of-the-first-3-months-from-last-6-months/m-p/3361777#M126397</link>
      <description>&lt;P&gt;You could use the WINDOW function, something like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Avg first 3 months =
VAR DatesToUse =
    WINDOW (
        -6,
        REL,
        -4,
        REL,
        ALL ( 'Date'[Year month], 'Date'[Year month sort column] ),
        ORDERBY ( 'Date'[Year month sort column] )
    )
VAR Result =
    AVERAGEX (
        DatesToUse,
        CALCULATE (
            [Measure to average],
            ALLEXCEPT ( 'Date', 'Date'[Year month], 'Date'[Year month sort column] )
        )
    )
RETURN
    Result
&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 02 Aug 2023 13:05:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-average-of-the-first-3-months-from-last-6-months/m-p/3361777#M126397</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-08-02T13:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the average of the first 3 months from last 6 months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-average-of-the-first-3-months-from-last-6-months/m-p/3361819#M126401</link>
      <description>&lt;P&gt;Thanks for feedback and I'm going to test !!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2023 13:34:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-average-of-the-first-3-months-from-last-6-months/m-p/3361819#M126401</guid>
      <dc:creator>pmargari</dc:creator>
      <dc:date>2023-08-02T13:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the average of the first 3 months from last 6 months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-average-of-the-first-3-months-from-last-6-months/m-p/3361867#M126406</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;johnt75&lt;BR /&gt;&lt;BR /&gt;It works , thanks a lot for your tip !!&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Avg first 3 months =&lt;/P&gt;&lt;P&gt;VAR DatesToUse =&lt;BR /&gt;WINDOW (&lt;BR /&gt;-6,&lt;BR /&gt;REL,&lt;BR /&gt;-4,&lt;BR /&gt;REL,&lt;BR /&gt;ALL ( 'Date'[YearMonth], 'Date'[Year-Month Index]),&lt;BR /&gt;ORDERBY ( 'Date'[Year-Month Index])&lt;BR /&gt;)&lt;BR /&gt;VAR Result =&lt;BR /&gt;AVERAGEX (&lt;BR /&gt;DatesToUse,&lt;BR /&gt;CALCULATE (&lt;BR /&gt;DIVIDE([# Leads],[# Processos]),&lt;BR /&gt;ALLEXCEPT ( 'Date', 'Date'[YearMonth], 'Date'[Year-Month Index] )&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Result&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;A href="https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-average-of-the-first-3-months-from-last-6-months/m-p/3361777#" target="_blank" rel="noopener"&gt;PREVIEW&lt;/A&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 02 Aug 2023 14:04:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-average-of-the-first-3-months-from-last-6-months/m-p/3361867#M126406</guid>
      <dc:creator>pmargari</dc:creator>
      <dc:date>2023-08-02T14:04:42Z</dc:date>
    </item>
  </channel>
</rss>

