<?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: Custom rolling calculation in Desktop</title>
    <link>https://community.fabric.microsoft.com/t5/Desktop/Custom-rolling-calculation/m-p/132546#M56590</link>
    <description>Thanks. Great appriciate Angle ^^. I'll follow then let u know lol.</description>
    <pubDate>Fri, 24 Feb 2017 03:36:01 GMT</pubDate>
    <dc:creator>philongxpct</dc:creator>
    <dc:date>2017-02-24T03:36:01Z</dc:date>
    <item>
      <title>Custom rolling calculation</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Custom-rolling-calculation/m-p/129876#M55301</link>
      <description>&lt;P&gt;I'm just a new guys on DAX. I have a function of sales: P= ((S0+S3)/2+S1+S2)/3&lt;/P&gt;&lt;P&gt;S0: Last month of previous quarter.&lt;/P&gt;&lt;P&gt;S1: First month of this quarter.&lt;BR /&gt;S2: second month of this quarter.&lt;/P&gt;&lt;P&gt;S3: last month of this quarter.&lt;/P&gt;&lt;P&gt;DATA run over years to years. Can anyone can help me how to calculate that, pls&amp;nbsp;@@&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2017 07:48:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Custom-rolling-calculation/m-p/129876#M55301</guid>
      <dc:creator>philongxpct</dc:creator>
      <dc:date>2017-02-20T07:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Custom rolling calculation</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Custom-rolling-calculation/m-p/130408#M55572</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="21978" data-lia-user-login="philongxpct" class="lia-mention lia-mention-user"&gt;philongxpct&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;First, you should create calculated columns month, quarter, the first month of this quarter, &lt;SPAN&gt;the second&amp;nbsp;month of this quarter, the end month of this quarter.&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;MonthOfYear = MONTH(Table1[Date])

Quarter = ROUNDUP(MONTH([Date])/3, 0)

Firstt = MONTH(STARTOFQUARTER(Table1[Date]))

End = MONTH(ENDOFQUARTER(Table1[Date]))

Second month = (CALCULATE(MAX(Table1[MonthOfYear]),ALLEXCEPT(Table1,Table1[Quarter])) +CALCULATE(MIN(Table1[MonthOfYear]),ALLEXCEPT(Table1,Table1[Quarter])))/2&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;Then create measures using the following formulas.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;S1 = CALCULATE(SUM(Table1[Sale]),FILTER(Table1,Table1[MonthOfYear]=Table1[Firstt]))

S2 = CALCULATE(SUM(Table1[Sale]),FILTER(Table1,Table1[MonthOfYear]=Table1[Second month]))

S3 = CALCULATE(SUM(Table1[Sale]),FILTER(Table1,Table1[MonthOfYear]=Table1[End]))

S0 = CALCULATE(Table1[Last],PARALLELPERIOD(Table1[Date],-1,QUARTER))&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;If you have other issues, don't hesitate to let me know.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Angelia&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 04:56:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Custom-rolling-calculation/m-p/130408#M55572</guid>
      <dc:creator>v-huizhn-msft</dc:creator>
      <dc:date>2017-02-21T04:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Custom rolling calculation</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Custom-rolling-calculation/m-p/132546#M56590</link>
      <description>Thanks. Great appriciate Angle ^^. I'll follow then let u know lol.</description>
      <pubDate>Fri, 24 Feb 2017 03:36:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Custom-rolling-calculation/m-p/132546#M56590</guid>
      <dc:creator>philongxpct</dc:creator>
      <dc:date>2017-02-24T03:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: Custom rolling calculation</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Custom-rolling-calculation/m-p/133504#M57038</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="21978" data-lia-user-login="philongxpct" class="lia-mention lia-mention-user"&gt;philongxpct&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;If you have resolved your issue, please mark the corresponding reply as answer, which will help more people. If you still have issue, please feel free to ask.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Angelia&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2017 09:06:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Custom-rolling-calculation/m-p/133504#M57038</guid>
      <dc:creator>v-huizhn-msft</dc:creator>
      <dc:date>2017-02-27T09:06:12Z</dc:date>
    </item>
  </channel>
</rss>

