<?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: SUM every 8 days value from today to last 6 months in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-every-8-days-value-from-today-to-last-6-months/m-p/2565829#M73104</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="369728" data-lia-user-login="ALEX2011ALfer_" class="lia-mention lia-mention-user"&gt;ALEX2011ALfer_&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;&lt;SPAN&gt;&amp;nbsp;to SUM every 8 days value from today to the last 6 months&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;You can try this, create the measures below&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure1 = 
var _n=8
var _diff=DATEDIFF(MIN('table'[Date]),TODAY(),DAY)
return mod(_diff,_n)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Measure2 = CALCULATE(SUM('table'[Index]),FILTER(ALL('table'),'table'[Date]&amp;lt;TODAY() &amp;amp;&amp;amp; 'table'[Date]&amp;gt;= EDATE(TODAY(),-6) &amp;amp;&amp;amp; [Measure1]=0))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="background: white;"&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; box-sizing: border-box; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px;"&gt;&lt;SPAN&gt;Community Support Team _Tang&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; box-sizing: border-box; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, please consider&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jun 2022 07:48:44 GMT</pubDate>
    <dc:creator>v-xiaotang</dc:creator>
    <dc:date>2022-06-08T07:48:44Z</dc:date>
    <item>
      <title>SUM every 8 days value from today to last 6 months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-every-8-days-value-from-today-to-last-6-months/m-p/2558640#M72736</link>
      <description>&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Hi guys,&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I wonder if it is possible to SUM every 8 days value from today to the last 6 months? Using Dax&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;* the type of the value is discrete so I need to take just one value for every 8 days, not the sum of the 8 days.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;* i can use filter to specify the last 6 months. Not necessary to do that in DAX&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanx !!&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":handshake:"&gt;🤝&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":purple_heart:"&gt;💜&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;@&lt;/SPAN&gt;RicoZhou&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2022 21:27:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-every-8-days-value-from-today-to-last-6-months/m-p/2558640#M72736</guid>
      <dc:creator>ALEX2011ALfer_</dc:creator>
      <dc:date>2022-06-03T21:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: SUM every 8 days value from today to last 6 months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-every-8-days-value-from-today-to-last-6-months/m-p/2558808#M72743</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="369728" data-lia-user-login="ALEX2011ALfer_" class="lia-mention lia-mention-user"&gt;ALEX2011ALfer_&lt;/a&gt; , You have to create that column in Table &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;quotient( -1* Datediff(today(), [Date], day),8)+1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will create a partition you can use in group by/row/axis etc .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can use a measure like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rolling 6 Sales = &lt;BR /&gt;var _max = today() &lt;BR /&gt;var _min = date(year(_max), month(_max)-6,1)&lt;BR /&gt;return &lt;BR /&gt;CALCULATE(SUM(Sales[Sales Amount]),filter(date, date[date] &amp;lt;=_max &amp;amp;&amp;amp; date[date] &amp;gt;=_min))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jun 2022 03:34:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-every-8-days-value-from-today-to-last-6-months/m-p/2558808#M72743</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-06-04T03:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: SUM every 8 days value from today to last 6 months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-every-8-days-value-from-today-to-last-6-months/m-p/2565829#M73104</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="369728" data-lia-user-login="ALEX2011ALfer_" class="lia-mention lia-mention-user"&gt;ALEX2011ALfer_&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;&lt;SPAN&gt;&amp;nbsp;to SUM every 8 days value from today to the last 6 months&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;You can try this, create the measures below&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure1 = 
var _n=8
var _diff=DATEDIFF(MIN('table'[Date]),TODAY(),DAY)
return mod(_diff,_n)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Measure2 = CALCULATE(SUM('table'[Index]),FILTER(ALL('table'),'table'[Date]&amp;lt;TODAY() &amp;amp;&amp;amp; 'table'[Date]&amp;gt;= EDATE(TODAY(),-6) &amp;amp;&amp;amp; [Measure1]=0))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="background: white;"&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; box-sizing: border-box; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px;"&gt;&lt;SPAN&gt;Community Support Team _Tang&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; box-sizing: border-box; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, please consider&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2022 07:48:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-every-8-days-value-from-today-to-last-6-months/m-p/2565829#M73104</guid>
      <dc:creator>v-xiaotang</dc:creator>
      <dc:date>2022-06-08T07:48:44Z</dc:date>
    </item>
  </channel>
</rss>

