<?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: Remaining Balance Depends on Prior Month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remaining-Balance-Depends-on-Prior-Month/m-p/4999609#M187074</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1532082" data-lia-user-login="Alex_DLV" class="lia-mention lia-mention-user"&gt;Alex_DLV&lt;/a&gt;&amp;nbsp;On the surface, this looks like it is essentially recursive but some problems like this can be solved without recursion. However, I am not certain there is enough information here to determine if this is one of those cases that can be calculated without recursion. If it is a truly recursive issue, DAX is not going to be an option.&lt;/P&gt;</description>
    <pubDate>Fri, 06 Feb 2026 20:01:28 GMT</pubDate>
    <dc:creator>GeraldGEmerick</dc:creator>
    <dc:date>2026-02-06T20:01:28Z</dc:date>
    <item>
      <title>Remaining Balance Depends on Prior Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remaining-Balance-Depends-on-Prior-Month/m-p/4999580#M187073</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I’m building a project revenue recognition system in Power BI and I want to confirm whether this type of rolling calculation is possible in DAX, given DirectQuery constraints.&lt;/P&gt;&lt;P&gt;I’ll explain using a simplified monthly example.&lt;/P&gt;&lt;P&gt;Each project has:&lt;/P&gt;&lt;P&gt;• Contract Value&lt;BR /&gt;• Total Project Days&lt;BR /&gt;• Project Days per Month&lt;/P&gt;&lt;P&gt;• Optional User Override (cumulative, entered at month end)&lt;/P&gt;&lt;P&gt;Goal: calculate per month:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Recognized Revenue&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Remaining Contract Value&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;At the begining :&amp;nbsp;Remaining = Contract Value&lt;/P&gt;&lt;P&gt;For each month:&lt;/P&gt;&lt;H3&gt;If override exists (override is cumulative-to-date):&lt;/H3&gt;&lt;P&gt;Recognized =&lt;BR /&gt;Override − SUM(previous months recognized)&lt;/P&gt;&lt;P&gt;Remaining =&lt;BR /&gt;Contract − Override&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If no override (straight-line on remaining):&lt;/P&gt;&lt;P&gt;Recognized =&lt;BR /&gt;Remaining × (Days in Month / Remaining Project Days)&lt;/P&gt;&lt;P&gt;Remaining =&lt;BR /&gt;Remaining − Recognized&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So:&lt;/P&gt;&lt;P&gt;Remaining(month N) depends on Recognized(month N−1)&lt;BR /&gt;Recognized(month N) depends on Remaining(month N−1)&lt;/P&gt;&lt;P&gt;This creates a rolling dependency chain.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Example. Project duration from 1st of Jan 2026 = 31st of Dec 2026&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Month Remaining Start Days Remaining Days Override Recognized&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Jan&lt;/TD&gt;&lt;TD&gt;435,806&lt;/TD&gt;&lt;TD&gt;31&lt;/TD&gt;&lt;TD&gt;365&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;37,013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Feb&lt;/TD&gt;&lt;TD&gt;398,793&lt;/TD&gt;&lt;TD&gt;28&lt;/TD&gt;&lt;TD&gt;334&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;33,432&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Mar&lt;/TD&gt;&lt;TD&gt;365,361&lt;/TD&gt;&lt;TD&gt;31&lt;/TD&gt;&lt;TD&gt;306&lt;/TD&gt;&lt;TD&gt;100,000&lt;/TD&gt;&lt;TD&gt;29,555&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Apr&lt;/TD&gt;&lt;TD&gt;335,806&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;TD&gt;275&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;36,633&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;May&lt;/TD&gt;&lt;TD&gt;299,173&lt;/TD&gt;&lt;TD&gt;31&lt;/TD&gt;&lt;TD&gt;245&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;37,855&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;…&lt;/TD&gt;&lt;TD&gt;…&lt;/TD&gt;&lt;TD&gt;…&lt;/TD&gt;&lt;TD&gt;…&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;…&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Override is cumulative:&lt;/P&gt;&lt;P&gt;March override = 100,000 means:&lt;/P&gt;&lt;P&gt;March Recognized =&lt;BR /&gt;100,000 − (Jan + Feb)&lt;/P&gt;&lt;P&gt;Remaining becomes:&lt;BR /&gt;Contract − 100,000&lt;/P&gt;&lt;P&gt;Then straight-line continues on the new remaining.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H2&gt;Technical Constraints&lt;/H2&gt;&lt;H2&gt;• Overrides must be live (using Qirect Query)&lt;BR /&gt;• Cannot create calculated tables&lt;BR /&gt;• Must be done in measures&lt;/H2&gt;&lt;P&gt;But:&lt;/P&gt;&lt;P&gt;Recognized(month N) depends on Remaining(month N−1)&lt;BR /&gt;Remaining(month N) depends on Recognized(month N)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H2&gt;Question&lt;/H2&gt;&lt;P&gt;Is this possible in pure DAX (with DirectQuery involved), or does this fundamentally require pre-materialization in SQL / Power Query?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2026 19:13:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remaining-Balance-Depends-on-Prior-Month/m-p/4999580#M187073</guid>
      <dc:creator>Alex_DLV</dc:creator>
      <dc:date>2026-02-06T19:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: Remaining Balance Depends on Prior Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remaining-Balance-Depends-on-Prior-Month/m-p/4999609#M187074</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1532082" data-lia-user-login="Alex_DLV" class="lia-mention lia-mention-user"&gt;Alex_DLV&lt;/a&gt;&amp;nbsp;On the surface, this looks like it is essentially recursive but some problems like this can be solved without recursion. However, I am not certain there is enough information here to determine if this is one of those cases that can be calculated without recursion. If it is a truly recursive issue, DAX is not going to be an option.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2026 20:01:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remaining-Balance-Depends-on-Prior-Month/m-p/4999609#M187074</guid>
      <dc:creator>GeraldGEmerick</dc:creator>
      <dc:date>2026-02-06T20:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: Remaining Balance Depends on Prior Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remaining-Balance-Depends-on-Prior-Month/m-p/5000217#M187081</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1532082" data-lia-user-login="Alex_DLV" class="lia-mention lia-mention-user"&gt;Alex_DLV&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;No this &lt;STRONG&gt;cannot be implemented in pure DAX measures&lt;/STRONG&gt;, including in &lt;STRONG&gt;DirectQuery or Microsoft Fabric semantic models&lt;/STRONG&gt;.&lt;/P&gt;&lt;P class=""&gt;&lt;BR /&gt;Your calculation is &lt;STRONG&gt;recursive and stateful&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Remaining(N) depends on Recognized(N−1)&lt;/LI&gt;&lt;LI&gt;Recognized(N) depends on Remaining(N−1)&lt;/LI&gt;&lt;LI&gt;Overrides reset the cumulative state mid-timeline&lt;/LI&gt;&lt;/UL&gt;&lt;P class=""&gt;&lt;STRONG&gt;DAX does not support recursive calculations or circular dependencies between measures.&lt;/STRONG&gt; Measures are evaluated independently and do not carry forward the result of a prior period’s calculation. This is consistent with Microsoft’s description of DAX evaluation context and measure behavior.&lt;BR /&gt;&lt;BR /&gt;&lt;A title="Learn DAX basics in Power BI Desktop" href="https://learn.microsoft.com/power-bi/transform-model/desktop-quickstart-learn-dax-basics" target="_self"&gt;Learn DAX basics in Power BI Desktop&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Microsoft Fabric does support this scenario but not inside DAX.&lt;/STRONG&gt;&lt;BR /&gt;Fabric’s architecture expects complex, stateful, or iterative transformations to be completed &lt;STRONG&gt;before&lt;/STRONG&gt; data reaches the semantic model.&lt;BR /&gt;&lt;BR /&gt;The semantic model (Direct Lake or DirectQuery) is designed for querying and aggregation, not procedural or recursive logic.&lt;BR /&gt;&lt;BR /&gt;&lt;A title="Direct Lake overview" href="https://learn.microsoft.com/en-us/fabric/fundamentals/direct-lake-overview" target="_self"&gt;Direct Lake overview&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Conclusion:&lt;/STRONG&gt;&lt;BR /&gt;The rolling recognized/remaining logic must be &lt;STRONG&gt;pre-materialized upstream&lt;/STRONG&gt; (SQL Analytics Endpoint, Warehouse, Lakehouse, Dataflow, or Spark). DAX should then be used only for slicing, filtering, and aggregation over the precomputed results.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Feb 2026 00:11:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remaining-Balance-Depends-on-Prior-Month/m-p/5000217#M187081</guid>
      <dc:creator>Olufemi7</dc:creator>
      <dc:date>2026-02-08T00:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Remaining Balance Depends on Prior Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remaining-Balance-Depends-on-Prior-Month/m-p/5001026#M187082</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1532082" data-lia-user-login="Alex_DLV" class="lia-mention lia-mention-user"&gt;Alex_DLV&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;DAX is not recursive and will never be.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Microsoft, though, provides a recursive language in Power BI for the ETL part: M (language of Power Query)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So my suggestion is:&lt;/P&gt;
&lt;P&gt;1 - try to get the nrs precalculated from IT&lt;/P&gt;
&lt;P&gt;2 - if (1) does not work or is not applicable, use M to perform these values&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this helped, please consider giving kudos and mark as a solution&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;@me in replies or I'll lose your thread&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Want to check your DAX skills? &lt;A href="https://www.linkedin.com/company/kubisco/" target="_blank"&gt;Answer my biweekly DAX challenges on the kubisco Linkedin page&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Consider voting &lt;A href="https://community.fabric.microsoft.com/t5/Fabric-Ideas/Power-BI-Filter-Pane-as-an-icon-on-the-right-side-bar-in-on/idi-p/4728588" target="_blank"&gt;this Power BI idea&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Francesco Bergamaschi&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;MBA, M.Eng, M.Econ, Professor of BI&lt;/P&gt;</description>
      <pubDate>Mon, 09 Feb 2026 08:23:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remaining-Balance-Depends-on-Prior-Month/m-p/5001026#M187082</guid>
      <dc:creator>FBergamaschi</dc:creator>
      <dc:date>2026-02-09T08:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Remaining Balance Depends on Prior Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remaining-Balance-Depends-on-Prior-Month/m-p/5012686#M187129</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1532082" data-lia-user-login="Alex_DLV" class="lia-mention lia-mention-user"&gt;Alex_DLV&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for reaching out to the Microsoft Community Forum.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1338394" data-lia-user-login="GeraldGEmerick" class="lia-mention lia-mention-user"&gt;GeraldGEmerick&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="843006" data-lia-user-login="Olufemi7" class="lia-mention lia-mention-user"&gt;Olufemi7&lt;/a&gt;&amp;nbsp; and&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1287762" data-lia-user-login="FBergamaschi" class="lia-mention lia-mention-user"&gt;FBergamaschi&lt;/a&gt;&amp;nbsp;,&amp;nbsp;Thank you for your prompt responses.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1532082" data-lia-user-login="Alex_DLV" class="lia-mention lia-mention-user"&gt;Alex_DLV&lt;/a&gt;&amp;nbsp;&amp;nbsp;,&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;could you please try the proposed solutions shared by&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1338394" data-lia-user-login="GeraldGEmerick" class="lia-mention lia-mention-user"&gt;GeraldGEmerick&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="843006" data-lia-user-login="Olufemi7" class="lia-mention lia-mention-user"&gt;Olufemi7&lt;/a&gt;&amp;nbsp; and&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1287762" data-lia-user-login="FBergamaschi" class="lia-mention lia-mention-user"&gt;FBergamaschi&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;? Let us know if you’re still facing the same issue we’ll be happy to assist you further.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Dinesh&lt;/P&gt;</description>
      <pubDate>Fri, 13 Feb 2026 04:48:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remaining-Balance-Depends-on-Prior-Month/m-p/5012686#M187129</guid>
      <dc:creator>v-dineshya</dc:creator>
      <dc:date>2026-02-13T04:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: Remaining Balance Depends on Prior Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remaining-Balance-Depends-on-Prior-Month/m-p/5038309#M187155</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1532082" data-lia-user-login="Alex_DLV" class="lia-mention lia-mention-user"&gt;Alex_DLV&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Dinesh&lt;/P&gt;</description>
      <pubDate>Mon, 16 Feb 2026 06:07:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remaining-Balance-Depends-on-Prior-Month/m-p/5038309#M187155</guid>
      <dc:creator>v-dineshya</dc:creator>
      <dc:date>2026-02-16T06:07:03Z</dc:date>
    </item>
  </channel>
</rss>

