<?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: Rolling number of invoice not yet due in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-number-of-invoice-not-yet-due/m-p/3482229#M133168</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="409309" data-lia-user-login="CarlBlunck" class="lia-mention lia-mention-user"&gt;CarlBlunck&lt;/a&gt;&amp;nbsp;this should give you the count of invoices that are not yet due for each month in your date range&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rolling Number of NYD DF Invoices =
VAR EOM = Max('dim_VendTrans-DueDateCalendar'[Date])
RETURN
    CALCULATE(
        [Number of DF Invoices],
        FILTER(
            ALL('dim_VendTrans-DueDateCalendar'[Date]),
            'dim_VendTrans-DueDateCalendar'[Date] &amp;lt;= EOM
        ),
        FILTER(
            ALL(d365_finops_vendtrans),
            d365_finops_vendtrans[DueDate] &amp;gt; EOM
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Or&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rolling Number of NYD DF Invoices =
VAR EOM = Max('dim_VendTrans-DueDateCalendar'[Date])
RETURN
    CALCULATE(
        [Number of DF Invoices],
        d365_finops_vendtrans[DueDate] &amp;gt;= DATE(2023,1,1),
        d365_finops_vendtrans[DueDate] &amp;lt;= EOM,
        d365_finops_vendtrans[PostingDate] &amp;lt; EOM,
        ALL ('dim_VendTrans-DueDateCalendar'[Date])
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if this work&lt;BR /&gt;@ me in replies or I'll lose your thread!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 18 Oct 2023 02:48:21 GMT</pubDate>
    <dc:creator>DallasBaba</dc:creator>
    <dc:date>2023-10-18T02:48:21Z</dc:date>
    <item>
      <title>Rolling number of invoice not yet due</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-number-of-invoice-not-yet-due/m-p/3482136#M133161</link>
      <description>&lt;P&gt;Hi team,&lt;/P&gt;&lt;P&gt;I am trying to calculate the rolling number of invoices that are not yet due.&amp;nbsp; For example, if an invoice was posted on the 01/01/2023 and has a due date of 30/06/2023, and I have a chart that shows the month-year from Jan 23 - Jul 23.&amp;nbsp; Then I would expect this to show a count of 1 for the months of Jan 23 - Jun 23 only.&amp;nbsp; Nothing for Jul 23, cause it is past it's due date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried this formula, but not getting the result and am unsure what other method to try...&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;From a model perspective, the&amp;nbsp;&lt;SPAN&gt;d365_finops_vendtrans&lt;/SPAN&gt;&lt;SPAN&gt;[DueDate] creates the dates in the&amp;nbsp;dim_VendTrans-DueDateCalendar' table and the&amp;nbsp;d365_finops_vendtrans[DueDate] is connected to the&amp;nbsp;'dim_VendTrans-DueDateCalendar'[Date] column.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Rolling Number of NYD DF Invoices =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV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;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;'dim_VendTrans-DueDateCalendar'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 18 Oct 2023 01:39:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-number-of-invoice-not-yet-due/m-p/3482136#M133161</guid>
      <dc:creator>CarlBlunck</dc:creator>
      <dc:date>2023-10-18T01:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling number of invoice not yet due</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-number-of-invoice-not-yet-due/m-p/3482229#M133168</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="409309" data-lia-user-login="CarlBlunck" class="lia-mention lia-mention-user"&gt;CarlBlunck&lt;/a&gt;&amp;nbsp;this should give you the count of invoices that are not yet due for each month in your date range&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rolling Number of NYD DF Invoices =
VAR EOM = Max('dim_VendTrans-DueDateCalendar'[Date])
RETURN
    CALCULATE(
        [Number of DF Invoices],
        FILTER(
            ALL('dim_VendTrans-DueDateCalendar'[Date]),
            'dim_VendTrans-DueDateCalendar'[Date] &amp;lt;= EOM
        ),
        FILTER(
            ALL(d365_finops_vendtrans),
            d365_finops_vendtrans[DueDate] &amp;gt; EOM
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Or&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rolling Number of NYD DF Invoices =
VAR EOM = Max('dim_VendTrans-DueDateCalendar'[Date])
RETURN
    CALCULATE(
        [Number of DF Invoices],
        d365_finops_vendtrans[DueDate] &amp;gt;= DATE(2023,1,1),
        d365_finops_vendtrans[DueDate] &amp;lt;= EOM,
        d365_finops_vendtrans[PostingDate] &amp;lt; EOM,
        ALL ('dim_VendTrans-DueDateCalendar'[Date])
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if this work&lt;BR /&gt;@ me in replies or I'll lose your thread!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 02:48:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-number-of-invoice-not-yet-due/m-p/3482229#M133168</guid>
      <dc:creator>DallasBaba</dc:creator>
      <dc:date>2023-10-18T02:48:21Z</dc:date>
    </item>
  </channel>
</rss>

