<?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 of Units by Invoice Date, Filtered by Ordered Date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-of-Units-by-Invoice-Date-Filtered-by-Ordered-Date/m-p/4676408#M179093</link>
    <description>&lt;P&gt;DATESBETWEEN requires a proper calendar table in your data model and does not work with BLANK() dates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Invoiced Total Units before Increase = calculate(
SUM('Order Fact Table' [Units]),
'Order Fact Table'[Ordered Date] &amp;lt;= dt"2025-04-30")&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 01 May 2025 19:40:33 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2025-05-01T19:40:33Z</dc:date>
    <item>
      <title>Sum of Units by Invoice Date, Filtered by Ordered Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-of-Units-by-Invoice-Date-Filtered-by-Ordered-Date/m-p/4676246#M179090</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to create a measure that sums only units ordered before a specific date. I then need to be able to put it in a table based on the invoiced date. The invoice date is the active relationship between my date table and fact table, and I have an inactive relationship between the date table and the ordered date. I've tried the following DAX but am getting no results (not an error - just a blank table). How can I modify this to get the sum of units only for orders placed before April 30th?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Invoiced Total Units before Increase = calculate(&lt;BR /&gt;SUM('Order Fact Table' [Units]),&lt;BR /&gt;datesbetween (&lt;BR /&gt;'Order Fact Table'[Ordered Date],&lt;BR /&gt;BLANK(),&lt;BR /&gt;04/30/2025 ))&lt;/P&gt;</description>
      <pubDate>Thu, 01 May 2025 17:30:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-of-Units-by-Invoice-Date-Filtered-by-Ordered-Date/m-p/4676246#M179090</guid>
      <dc:creator>Dave1mo1</dc:creator>
      <dc:date>2025-05-01T17:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of Units by Invoice Date, Filtered by Ordered Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-of-Units-by-Invoice-Date-Filtered-by-Ordered-Date/m-p/4676408#M179093</link>
      <description>&lt;P&gt;DATESBETWEEN requires a proper calendar table in your data model and does not work with BLANK() dates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Invoiced Total Units before Increase = calculate(
SUM('Order Fact Table' [Units]),
'Order Fact Table'[Ordered Date] &amp;lt;= dt"2025-04-30")&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 01 May 2025 19:40:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-of-Units-by-Invoice-Date-Filtered-by-Ordered-Date/m-p/4676408#M179093</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-05-01T19:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of Units by Invoice Date, Filtered by Ordered Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-of-Units-by-Invoice-Date-Filtered-by-Ordered-Date/m-p/4676412#M179094</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Here is one way to do this.&lt;BR /&gt;&lt;BR /&gt;data:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Dax:&lt;BR /&gt;&lt;BR /&gt;&lt;/P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SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This will return 150 since only 2 rows are before the selected datemax.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;SPAN&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;My LinkedIn: &lt;A href="https://www.linkedin.com/in/n%C3%A4ttiahov-00001/" target="_blank"&gt;https://www.linkedin.com/in/n%C3%A4ttiahov-00001/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 01 May 2025 19:44:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-of-Units-by-Invoice-Date-Filtered-by-Ordered-Date/m-p/4676412#M179094</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2025-05-01T19:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of Units by Invoice Date, Filtered by Ordered Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-of-Units-by-Invoice-Date-Filtered-by-Ordered-Date/m-p/4676724#M179103</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="621768" data-lia-user-login="Dave1mo1" class="lia-mention lia-mention-user"&gt;Dave1mo1&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for reaching out to the Microsoft Fabric Forum Community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And aslo Thanks to&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343431" data-lia-user-login="ValtteriN" class="lia-mention lia-mention-user"&gt;ValtteriN&lt;/a&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp; for Prompt and useful solution.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Try below Dax:&lt;/P&gt;
&lt;P&gt;Invoiced Total Units before Increase = &lt;BR /&gt;CALCULATE(&lt;BR /&gt;SUM('Order Fact Table'[Units]),&lt;BR /&gt;'Date Table'[Date] &amp;lt; DATE(2025, 4, 30),&lt;BR /&gt;USERELATIONSHIP('Date Table'[Date], 'Order Fact Table'[Ordered Date])&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;Let us know if you need further assistance , we’re happy to help. If this addressed your query, please consider marking the response as an Accepted Solution so it can assist others in the community as well.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thank you &amp;amp; Regards,&lt;BR /&gt;Prasanna kumar&lt;/P&gt;</description>
      <pubDate>Fri, 02 May 2025 04:59:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-of-Units-by-Invoice-Date-Filtered-by-Ordered-Date/m-p/4676724#M179103</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-05-02T04:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of Units by Invoice Date, Filtered by Ordered Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-of-Units-by-Invoice-Date-Filtered-by-Ordered-Date/m-p/4682668#M179346</link>
      <description>&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="621768" data-lia-user-login="Dave1mo1" class="lia-mention lia-mention-user"&gt;Dave1mo1&lt;/a&gt;,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Just following up to see if the solution provided was helpful in resolving your issue. Please feel free to let us know if you need any further assistance.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;If the response addressed your query, kindly mark it as &lt;SPAN&gt;Accepted Solution&lt;/SPAN&gt; and click &lt;SPAN&gt;Yes&lt;/SPAN&gt; if you found it helpful — this will benefit others in the community as well.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Best regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Prasanna Kumar&lt;/P&gt;</description>
      <pubDate>Wed, 07 May 2025 06:48:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-of-Units-by-Invoice-Date-Filtered-by-Ordered-Date/m-p/4682668#M179346</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-05-07T06:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of Units by Invoice Date, Filtered by Ordered Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-of-Units-by-Invoice-Date-Filtered-by-Ordered-Date/m-p/4692146#M179672</link>
      <description>&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="621768" data-lia-user-login="Dave1mo1" class="lia-mention lia-mention-user"&gt;Dave1mo1&lt;/a&gt;,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;We wanted to kindly check in to see if everything is working as expected after trying the suggested solution. If there’s anything else we can assist with, please don’t hesitate to ask.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;If the issue is resolved, we’d appreciate it if you could mark the helpful reply as &lt;SPAN&gt;Accepted Solution&lt;/SPAN&gt; — it helps others who might face a similar issue.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Warm regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Prasanna Kumar&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2025 09:16:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-of-Units-by-Invoice-Date-Filtered-by-Ordered-Date/m-p/4692146#M179672</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-05-14T09:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of Units by Invoice Date, Filtered by Ordered Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-of-Units-by-Invoice-Date-Filtered-by-Ordered-Date/m-p/4697860#M179936</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="621768" data-lia-user-login="Dave1mo1" class="lia-mention lia-mention-user"&gt;Dave1mo1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just a gentle reminder&amp;nbsp; has your issue been resolved? If so, we’d be grateful if you could mark the solution that worked as &lt;STRONG&gt;Accepted Solution&lt;/STRONG&gt;, or feel free to share your own if you found a different fix.&lt;/P&gt;
&lt;P&gt;This not only closes the loop on your query but also helps others in the community solve similar issues faster.&lt;/P&gt;
&lt;P&gt;Thank you for your time and feedback!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Prasanna Kumar&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2025 07:00:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-of-Units-by-Invoice-Date-Filtered-by-Ordered-Date/m-p/4697860#M179936</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-05-19T07:00:17Z</dc:date>
    </item>
  </channel>
</rss>

