<?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: Add  blank weeks into first week of extract in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Add-blank-weeks-into-first-week-of-extract/m-p/3228354#M118335</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="460868" data-lia-user-login="FreemanZ" class="lia-mention lia-mention-user"&gt;FreemanZ&lt;/a&gt;&amp;nbsp;: Thanks. I mean the value 70 for the 3th row, it should be added into the first bucket. 50+70&lt;/P&gt;</description>
    <pubDate>Wed, 10 May 2023 08:05:47 GMT</pubDate>
    <dc:creator>joshua1990</dc:creator>
    <dc:date>2023-05-10T08:05:47Z</dc:date>
    <item>
      <title>Add  blank weeks into first week of extract</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Add-blank-weeks-into-first-week-of-extract/m-p/3228116#M118309</link>
      <description>&lt;P&gt;Hi experts!&lt;/P&gt;
&lt;P&gt;I have a weekly archive of our sales data:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;Archival Year-Week&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;Actual Year-Week&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;Value&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;2023-01&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;2023-01&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;50&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;2023-01&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;2023-02&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;60&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="30px"&gt;2023-01&lt;/TD&gt;
&lt;TD height="30px"&gt;NA&lt;/TD&gt;
&lt;TD height="30px"&gt;70&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="30px"&gt;2023-02&lt;/TD&gt;
&lt;TD height="30px"&gt;2023-02&lt;/TD&gt;
&lt;TD height="30px"&gt;80&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="30px"&gt;2023-03&lt;/TD&gt;
&lt;TD height="30px"&gt;2023-03&lt;/TD&gt;
&lt;TD height="30px"&gt;50&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you can see, the actual year-week column is sometimes "NA". If this is the case I would like to put it into the first year-Week for each extract.&lt;/P&gt;
&lt;P&gt;For instance, in table above the rows 3 should be added into the 2023-01 bucket with the value 70. &amp;gt; 50+70&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How would you do that in dax?&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 04:22:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Add-blank-weeks-into-first-week-of-extract/m-p/3228116#M118309</guid>
      <dc:creator>joshua1990</dc:creator>
      <dc:date>2023-05-10T04:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Add  blank weeks into first week of extract</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Add-blank-weeks-into-first-week-of-extract/m-p/3228255#M118326</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92006" data-lia-user-login="joshua1990" class="lia-mention lia-mention-user"&gt;joshua1990&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what do you mean by "with the value 70. &amp;gt; 50+70"?&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 07:06:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Add-blank-weeks-into-first-week-of-extract/m-p/3228255#M118326</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-05-10T07:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: Add  blank weeks into first week of extract</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Add-blank-weeks-into-first-week-of-extract/m-p/3228354#M118335</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="460868" data-lia-user-login="FreemanZ" class="lia-mention lia-mention-user"&gt;FreemanZ&lt;/a&gt;&amp;nbsp;: Thanks. I mean the value 70 for the 3th row, it should be added into the first bucket. 50+70&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 08:05:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Add-blank-weeks-into-first-week-of-extract/m-p/3228354#M118335</guid>
      <dc:creator>joshua1990</dc:creator>
      <dc:date>2023-05-10T08:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Add  blank weeks into first week of extract</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Add-blank-weeks-into-first-week-of-extract/m-p/3229836#M118485</link>
      <description>No ideas?</description>
      <pubDate>Thu, 11 May 2023 05:36:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Add-blank-weeks-into-first-week-of-extract/m-p/3229836#M118485</guid>
      <dc:creator>joshua1990</dc:creator>
      <dc:date>2023-05-11T05:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Add  blank weeks into first week of extract</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Add-blank-weeks-into-first-week-of-extract/m-p/3232199#M118653</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92006" data-lia-user-login="joshua1990" class="lia-mention lia-mention-user"&gt;joshua1990&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could try to add an index.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Create a measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = var _sum1=CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),[Actual Year-Week]="NA"))
var _sum2=SUM('Table'[Value])
return IF(MAX('Table'[Index])=1,_sum1+_sum2,_sum2)&lt;/LI-CODE&gt;
&lt;P&gt;Create the below visual, filter out "NA".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Stephen Tao&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then 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. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 05:54:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Add-blank-weeks-into-first-week-of-extract/m-p/3232199#M118653</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-12T05:54:37Z</dc:date>
    </item>
  </channel>
</rss>

