<?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 DAX Trend function. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Trend-function/m-p/1698069#M34947</link>
    <description>&lt;P&gt;Hi everyone.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help with a calculation with a Trend.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The excel formula that we use is mannualy changed each month, but we want to have it in Power Bi without of course de mannualy calculations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trend = Average( of the last 3 months)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example, if we are in April the Trend should be the Average of the values from Jan, Feb and Mar, and if we are in May should be from Feb, Mar, Apr.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a Calendar table with the following structure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;</description>
    <pubDate>Tue, 02 Mar 2021 09:33:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-03-02T09:33:50Z</dc:date>
    <item>
      <title>DAX Trend function.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Trend-function/m-p/1698069#M34947</link>
      <description>&lt;P&gt;Hi everyone.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help with a calculation with a Trend.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The excel formula that we use is mannualy changed each month, but we want to have it in Power Bi without of course de mannualy calculations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trend = Average( of the last 3 months)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example, if we are in April the Trend should be the Average of the values from Jan, Feb and Mar, and if we are in May should be from Feb, Mar, Apr.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a Calendar table with the following structure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 09:33:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Trend-function/m-p/1698069#M34947</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-03-02T09:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Trend function.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Trend-function/m-p/1698255#M34953</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , try a measure like given below with Date Table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rolling 3 = divide( CALCULATE(sum(Sales[Sales]),DATESINPERIOD('Date'[Date ],eomonth(MAX('Date'[Date]),-1),-3,MONTH)) ,&lt;BR /&gt;CALCULATE(distinctCOUNT('Date'[Month Year]),DATESINPERIOD('Date'[Date],eomonth(MAX('Date'[Date]),-1),-3,MONTH), filter(Sales,not(isblank((Sales[Sales])))))) &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rolling 3 = CALCULATE(Average(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],eomonth(MAX('Date'[Date ]),-1),-3,MONTH))&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 10:37:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Trend-function/m-p/1698255#M34953</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-03-02T10:37:19Z</dc:date>
    </item>
  </channel>
</rss>

