<?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: Next Week Projected Sales in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Next-Week-Projected-Sales/m-p/3059183#M105621</link>
    <description>&lt;P&gt;hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="443080" data-lia-user-login="gsmith_eqd" class="lia-mention lia-mention-user"&gt;gsmith_eqd&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try first adjust the return type of the 2nd WEEKNUM:&lt;/P&gt;&lt;P&gt;EstimatedInvoicing =&lt;/P&gt;&lt;P&gt;VAR __ThisDate = TODAY()&lt;/P&gt;&lt;P&gt;VAR __ThisWeek = WEEKNUM(__ThisDate, 1)&lt;/P&gt;&lt;P&gt;VAR __NextWeek = __ThisWeek + 1&lt;/P&gt;&lt;P&gt;VAR __ThisYear = YEAR(__ThisDate)&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CALCULATE([TotalSales], &lt;STRONG&gt;WEEKNUM(SalesOrderLine[ShipDate], 1)&lt;/STRONG&gt; = __NextWeek &amp;amp;&amp;amp; YEAR(SalesOrderLine[ShipDate]) = __ThisYear)&lt;/P&gt;</description>
    <pubDate>Fri, 03 Feb 2023 00:01:07 GMT</pubDate>
    <dc:creator>FreemanZ</dc:creator>
    <dc:date>2023-02-03T00:01:07Z</dc:date>
    <item>
      <title>Next Week Projected Sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Next-Week-Projected-Sales/m-p/3059111#M105619</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I'm trying to create a measure for a report that displays the sum of the sales amount for the following week by filtering based on the shipdate column. There is no error appearing in the formula, but the field is still coming up blank and I can't figure out why.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the total sales measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TotalSales = SUM(SalesOrderLine[Amount])&lt;BR /&gt;&lt;BR /&gt;And here's the measure coming up blank:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EstimatedInvoicing =&lt;BR /&gt;VAR __ThisDate = TODAY()&lt;BR /&gt;VAR __ThisWeek = WEEKNUM(__ThisDate, 1)&lt;BR /&gt;VAR __NextWeek = __ThisWeek + 1&lt;BR /&gt;VAR __ThisYear = YEAR(__ThisDate)&lt;BR /&gt;RETURN&lt;/P&gt;&lt;P&gt;CALCULATE([TotalSales], WEEKNUM(SalesOrderLine[ShipDate]) = __NextWeek &amp;amp;&amp;amp; YEAR(SalesOrderLine[ShipDate]) = __ThisYear)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I realize I will probably have to build in an exception for end of year scenarios, but for now _ThisWeek + 1 should be appropriate to give me a populated field. I've tried rephrasing __NextWeek as 'WEEKNUM(__ThisDate, 1) +1' but it didn't make a difference.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;As an experiment I tried writing this without the variables and what I found was interesting.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;EstimatedInvoicing TEST =&lt;/P&gt;&lt;P&gt;CALCULATE([TotalSales], WEEKNUM(SalesOrderLine[ShipDate]) = WEEKNUM(TODAY()) + 1 &amp;amp;&amp;amp; YEAR(SalesOrderLine[ShipDate]) = YEAR(TODAY()))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The measure above gave a blank column. However, when I removed the year filter clause, it was no longer blank. It also wasn't the value I was looking for, but I'm wondering if this is any evidence to help solve this problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 22:47:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Next-Week-Projected-Sales/m-p/3059111#M105619</guid>
      <dc:creator>gsmith_eqd</dc:creator>
      <dc:date>2023-02-02T22:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: Next Week Projected Sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Next-Week-Projected-Sales/m-p/3059183#M105621</link>
      <description>&lt;P&gt;hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="443080" data-lia-user-login="gsmith_eqd" class="lia-mention lia-mention-user"&gt;gsmith_eqd&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try first adjust the return type of the 2nd WEEKNUM:&lt;/P&gt;&lt;P&gt;EstimatedInvoicing =&lt;/P&gt;&lt;P&gt;VAR __ThisDate = TODAY()&lt;/P&gt;&lt;P&gt;VAR __ThisWeek = WEEKNUM(__ThisDate, 1)&lt;/P&gt;&lt;P&gt;VAR __NextWeek = __ThisWeek + 1&lt;/P&gt;&lt;P&gt;VAR __ThisYear = YEAR(__ThisDate)&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CALCULATE([TotalSales], &lt;STRONG&gt;WEEKNUM(SalesOrderLine[ShipDate], 1)&lt;/STRONG&gt; = __NextWeek &amp;amp;&amp;amp; YEAR(SalesOrderLine[ShipDate]) = __ThisYear)&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 00:01:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Next-Week-Projected-Sales/m-p/3059183#M105621</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-02-03T00:01:07Z</dc:date>
    </item>
  </channel>
</rss>

