<?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 Need some help with some measures and logic in DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4886939#M186089</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Hello everyone,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would appreciate your help with some metrics or the method to achieve the following objective:&lt;/P&gt;&lt;P&gt;I would like to build a Power BI report that, starting from a table tAG, with the following fields:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Date | Store | Agent | Expenses | Revenues&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Calculates the &lt;STRONG&gt;uncovered expense balance&lt;/STRONG&gt; following these rules:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;The expenses for the year can be covered with revenues from the 3 months following that year. Once covered, they go on to cover the expenses of the next year. In this case, the year is considered closed without any remaining expenses to cover. If they are not fully covered, the year will end with an uncovered balance, and starting from &lt;STRONG&gt;March 31st of that year&lt;/STRONG&gt;, they accumulate into the expense balance for the next year.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This information would be grouped by &lt;STRONG&gt;Agent&lt;/STRONG&gt; and displayed in tables with &lt;STRONG&gt;Agent&lt;/STRONG&gt; and &lt;STRONG&gt;Date&lt;/STRONG&gt; details, using a &lt;STRONG&gt;single-year slicer&lt;/STRONG&gt; for selection. Additionally, there would be a summary at the &lt;STRONG&gt;year&lt;/STRONG&gt; level.&lt;/P&gt;&lt;P&gt;The matrix, with a single-year slicer, should show:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Gastos_Ac&lt;/STRONG&gt;: Accumulated Expenses for the selected year up to the selected date.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Ingresos_Ac&lt;/STRONG&gt;: Accumulated Revenues for the selected year up to the selected date.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Ingresos_Compensa&lt;/STRONG&gt;: Revenues accumulated for the selected year, dedicated to compensating a negative balance from the previous year.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Here’s how I explain it:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;The previous year had both revenues and expenses. The difference between expenses and revenues is handled as follows:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;If revenues are greater than expenses, the year closes "OK" and the balance is not considered.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;If expenses exceed revenues, the difference stays as a &lt;STRONG&gt;compensation balance&lt;/STRONG&gt; to be covered in the following year.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;This compensation happens only within the first 3 months (up to &lt;STRONG&gt;March 31st&lt;/STRONG&gt;), as follows:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;For example, in January, the previous year closed with a balance of 300 in uncovered expenses. We have 100 in current expenses and 200 in revenues. The remaining 100 of the previous year’s expenses and 100 of the current year’s expenses would be covered, totaling 200 in compensation revenues.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;If in February there are no expenses and 200 in revenues, we will accumulate 300 in &lt;STRONG&gt;Ingresos Compensa&lt;/STRONG&gt; and 100 in &lt;STRONG&gt;Ingresos_AC_Netos&lt;/STRONG&gt;.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Ingresos_AC_Netos&lt;/STRONG&gt;: These are the revenues dedicated to compensating the &lt;STRONG&gt;Gastos_Ac&lt;/STRONG&gt; of the current year. At most, this can be equal to &lt;STRONG&gt;Gastos_Ac&lt;/STRONG&gt;, and it consists of &lt;STRONG&gt;Ingresos_AC_Netos&lt;/STRONG&gt; for the selected year plus the &lt;STRONG&gt;Ingresos Compensa&lt;/STRONG&gt; from the following year. (The &lt;STRONG&gt;Ingresos_AC_Netos&lt;/STRONG&gt; include the &lt;STRONG&gt;Ingresos Compensa&lt;/STRONG&gt; from the following year.)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Finally, the result will show the days of the year with values and the days of the next 3 months with &lt;STRONG&gt;Ingresos Compensa&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I am having trouble visualizing how to apply the DAX logic to achieve these measures, despite the simplicity of doing this in Excel.&lt;/P&gt;&lt;H2&gt;Best regards,&lt;/H2&gt;</description>
    <pubDate>Wed, 26 Nov 2025 19:31:39 GMT</pubDate>
    <dc:creator>Carlos_Noob</dc:creator>
    <dc:date>2025-11-26T19:31:39Z</dc:date>
    <item>
      <title>Need some help with some measures and logic in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4886939#M186089</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hello everyone,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would appreciate your help with some metrics or the method to achieve the following objective:&lt;/P&gt;&lt;P&gt;I would like to build a Power BI report that, starting from a table tAG, with the following fields:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Date | Store | Agent | Expenses | Revenues&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Calculates the &lt;STRONG&gt;uncovered expense balance&lt;/STRONG&gt; following these rules:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;The expenses for the year can be covered with revenues from the 3 months following that year. Once covered, they go on to cover the expenses of the next year. In this case, the year is considered closed without any remaining expenses to cover. If they are not fully covered, the year will end with an uncovered balance, and starting from &lt;STRONG&gt;March 31st of that year&lt;/STRONG&gt;, they accumulate into the expense balance for the next year.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This information would be grouped by &lt;STRONG&gt;Agent&lt;/STRONG&gt; and displayed in tables with &lt;STRONG&gt;Agent&lt;/STRONG&gt; and &lt;STRONG&gt;Date&lt;/STRONG&gt; details, using a &lt;STRONG&gt;single-year slicer&lt;/STRONG&gt; for selection. Additionally, there would be a summary at the &lt;STRONG&gt;year&lt;/STRONG&gt; level.&lt;/P&gt;&lt;P&gt;The matrix, with a single-year slicer, should show:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Gastos_Ac&lt;/STRONG&gt;: Accumulated Expenses for the selected year up to the selected date.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Ingresos_Ac&lt;/STRONG&gt;: Accumulated Revenues for the selected year up to the selected date.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Ingresos_Compensa&lt;/STRONG&gt;: Revenues accumulated for the selected year, dedicated to compensating a negative balance from the previous year.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Here’s how I explain it:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;The previous year had both revenues and expenses. The difference between expenses and revenues is handled as follows:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;If revenues are greater than expenses, the year closes "OK" and the balance is not considered.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;If expenses exceed revenues, the difference stays as a &lt;STRONG&gt;compensation balance&lt;/STRONG&gt; to be covered in the following year.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;This compensation happens only within the first 3 months (up to &lt;STRONG&gt;March 31st&lt;/STRONG&gt;), as follows:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;For example, in January, the previous year closed with a balance of 300 in uncovered expenses. We have 100 in current expenses and 200 in revenues. The remaining 100 of the previous year’s expenses and 100 of the current year’s expenses would be covered, totaling 200 in compensation revenues.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;If in February there are no expenses and 200 in revenues, we will accumulate 300 in &lt;STRONG&gt;Ingresos Compensa&lt;/STRONG&gt; and 100 in &lt;STRONG&gt;Ingresos_AC_Netos&lt;/STRONG&gt;.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Ingresos_AC_Netos&lt;/STRONG&gt;: These are the revenues dedicated to compensating the &lt;STRONG&gt;Gastos_Ac&lt;/STRONG&gt; of the current year. At most, this can be equal to &lt;STRONG&gt;Gastos_Ac&lt;/STRONG&gt;, and it consists of &lt;STRONG&gt;Ingresos_AC_Netos&lt;/STRONG&gt; for the selected year plus the &lt;STRONG&gt;Ingresos Compensa&lt;/STRONG&gt; from the following year. (The &lt;STRONG&gt;Ingresos_AC_Netos&lt;/STRONG&gt; include the &lt;STRONG&gt;Ingresos Compensa&lt;/STRONG&gt; from the following year.)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Finally, the result will show the days of the year with values and the days of the next 3 months with &lt;STRONG&gt;Ingresos Compensa&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I am having trouble visualizing how to apply the DAX logic to achieve these measures, despite the simplicity of doing this in Excel.&lt;/P&gt;&lt;H2&gt;Best regards,&lt;/H2&gt;</description>
      <pubDate>Wed, 26 Nov 2025 19:31:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4886939#M186089</guid>
      <dc:creator>Carlos_Noob</dc:creator>
      <dc:date>2025-11-26T19:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with some measures and logic in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4886995#M186090</link>
      <description>&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;Do not include sensitive information. Do not include anything that is unrelated to the issue or question. &lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Need help uploading data? &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Nov 2025 21:48:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4886995#M186090</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-11-26T21:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with some measures and logic in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4887106#M186091</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1438760" data-lia-user-login="Carlos_Noob" class="lia-mention lia-mention-user"&gt;Carlos_Noob&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;as mentioned by&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;, we need sample data or input/output screenshot to work with.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Praful&lt;/P&gt;</description>
      <pubDate>Thu, 27 Nov 2025 04:06:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4887106#M186091</guid>
      <dc:creator>Praful_Potphode</dc:creator>
      <dc:date>2025-11-27T04:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with some measures and logic in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4887184#M186093</link>
      <description>&lt;P&gt;Please share a simplified version of your PBIX file (in English) without sensitive data. You can upload it to a public cloud service like OneDrive, Google Drive, or Dropbox and share the link. This will help in understanding your data structure and the issue, allowing for more precise guidance.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Nov 2025 05:44:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4887184#M186093</guid>
      <dc:creator>Kedar_Pande</dc:creator>
      <dc:date>2025-11-27T05:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with some measures and logic in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4887747#M186106</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1438760" data-lia-user-login="Carlos_Noob" class="lia-mention lia-mention-user"&gt;Carlos_Noob&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;I don’t know your data or your model, but with the help of your context and using an AI, I arrived at the measures below:&lt;/P&gt;&lt;P&gt;*** Important: You need a dCalendar table ***&lt;/P&gt;&lt;P&gt;Expenses = SUM(tAG[Despesas])&lt;BR /&gt;Revenues = SUM(tAG[Receitas])&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Expenses_Ac =&lt;BR /&gt;// Accumulated expenses in the selected year (in the current row context - Agent, Date)&lt;BR /&gt;CALCULATE(&lt;BR /&gt;[Expenses],&lt;BR /&gt;DATESYTD('dCalendario'[Data])&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Revenues_Ac =&lt;BR /&gt;// Accumulated revenues in the selected year (in the current row context - Agent, Date)&lt;BR /&gt;CALCULATE(&lt;BR /&gt;[Revenues],&lt;BR /&gt;DATESYTD('dCalendario'[Data])&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Previous_Year_Pending_Balance =&lt;BR /&gt;// Calculates the negative balance (uncovered expenses) from the previous year.&lt;BR /&gt;// This value is always 0 or negative.&lt;BR /&gt;VAR SelectedYear = MAX('dCalendario'[Ano])&lt;/P&gt;&lt;P&gt;VAR ExpensesPrevYear =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;[Expenses],&lt;BR /&gt;ALL('dCalendario'),&lt;BR /&gt;'dCalendario'[Ano] = SelectedYear - 1&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;VAR RevenuesPrevYear =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;[Revenues],&lt;BR /&gt;ALL('dCalendario'),&lt;BR /&gt;'dCalendario'[Ano] = SelectedYear - 1&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;VAR BalancePrevYear = RevenuesPrevYear - ExpensesPrevYear&lt;/P&gt;&lt;P&gt;VAR UncoveredBalance =&lt;BR /&gt;// If the balance is negative (uncovered), returns the negative value.&lt;BR /&gt;MIN(0, BalancePrevYear)&lt;/P&gt;&lt;P&gt;RETURN UncoveredBalance&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Compensating_Revenues =&lt;BR /&gt;// Calculates the accumulated revenues (up to March 31st of the selected year)&lt;BR /&gt;// used to cover the Previous_Year_Pending_Balance.&lt;BR /&gt;VAR PendingBalancePrevYear = [Previous_Year_Pending_Balance]&lt;/P&gt;&lt;P&gt;VAR RevenuesAcumulated3Months =&lt;BR /&gt;// Accumulated revenues in the selected year, limited to the first 3 months (Jan, Feb, Mar)&lt;BR /&gt;CALCULATE(&lt;BR /&gt;[Revenues],&lt;BR /&gt;DATESYTD('dCalendario'[Data]),&lt;BR /&gt;FILTER(&lt;BR /&gt;ALL('dCalendario'[Data], 'dCalendario'[Mês]), // Remove date context, but limit to first 3 months&lt;BR /&gt;'dCalendario'[Mês] &amp;lt;= 3&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;VAR CompensationAmount =&lt;BR /&gt;// The compensation value is the MINIMUM of:&lt;BR /&gt;// 1. Available revenues in the 3-month window.&lt;BR /&gt;// 2. The absolute value of the pending balance from the previous year.&lt;BR /&gt;MIN(&lt;BR /&gt;RevenuesAcumulated3Months,&lt;BR /&gt;ABS(PendingBalancePrevYear)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;// Returns the value used for compensation (positive value)&lt;BR /&gt;RETURN CompensationAmount&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Net_Revenues_Ac =&lt;BR /&gt;// Revenues dedicated to covering the current year's accumulated expenses (Expenses_Ac),&lt;BR /&gt;// after covering the previous year's pending balance.&lt;BR /&gt;VAR ExpensesAccumulatedCurrent = [Expenses_Ac]&lt;BR /&gt;VAR RevenuesAccumulatedCurrent = [Revenues_Ac]&lt;BR /&gt;VAR CompensatedValuePrevYear = [Compensating_Revenues]&lt;/P&gt;&lt;P&gt;VAR NetRevenueForCurrentExpenses = RevenuesAccumulatedCurrent - CompensatedValuePrevYear&lt;/P&gt;&lt;P&gt;VAR RevenueCompensatingCurrent =&lt;BR /&gt;// Net revenues used for current expenses, capped by the actual current accumulated expenses.&lt;BR /&gt;MIN(ExpensesAccumulatedCurrent, NetRevenueForCurrentExpenses)&lt;/P&gt;&lt;P&gt;RETURN RevenueCompensatingCurrent&lt;BR /&gt;&lt;BR /&gt;Uncovered_Expenses_Final_Balance =&lt;BR /&gt;// Final balance of uncovered expenses: Accumulated expenses minus net revenues covering them.&lt;BR /&gt;[Expenses_Ac] - [Net_Revenues_Ac]&lt;/P&gt;</description>
      <pubDate>Thu, 27 Nov 2025 13:56:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4887747#M186106</guid>
      <dc:creator>rodrigosan</dc:creator>
      <dc:date>2025-11-27T13:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with some measures and logic in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4888591#M186125</link>
      <description>&lt;P&gt;Thanks for your answers, I've tryed this solution but i dont get the results. I have something similar but im only get the results for the first year. Ive changed some names to make it more clear. For example, first would be the sample data and, segond would be the expected results. I upload the excel with the formulas and what ive been able to archieve in the pbix file in wetransfer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://we.tl/t-Jo24IhI22a" target="_blank"&gt;https://we.tl/t-Jo24IhI22a&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for ur help&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2025 18:36:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4888591#M186125</guid>
      <dc:creator>Carlos_Noob</dc:creator>
      <dc:date>2025-11-28T18:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with some measures and logic in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4888597#M186126</link>
      <description>&lt;P&gt;Hi, thanks for ur answers. Not sure if Ive replied correctly, perhaps this message appears twice, sorry in advance if thats the case. Ive tried something in the way RodrigoSan suggested. Ive not been able to get it works for more than the first year. Ive changed the name of the initial metrics to something more clear.&lt;/P&gt;&lt;P&gt;This is the link to weetranfer whit the excel with the expected results formulated and the pbix file with the metrics iv been able to get, (DAX Sheet "TryOne").&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://we.tl/t-Jo24IhI22a" target="_blank"&gt;https://we.tl/t-Jo24IhI22a&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would be the data xample;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;And this the expected results;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks for your help&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2025 18:50:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4888597#M186126</guid>
      <dc:creator>Carlos_Noob</dc:creator>
      <dc:date>2025-11-28T18:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with some measures and logic in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4889104#M186146</link>
      <description>&lt;P&gt;Thank you for providing the sample data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have bad news for you - Power BI/DAX does not support conditional aggregation.&amp;nbsp; The only function that supports it is List.Accumulate in Power Query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would also need to indicate what your starting date is.&amp;nbsp; Do we assume there is no debt carrying over from 2021?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Nov 2025 18:13:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4889104#M186146</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-11-30T18:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with some measures and logic in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4889866#M186160</link>
      <description>&lt;P&gt;Thanks for your response, Ibendlin.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, in the first year of the data, we assume it as the starting point with a previous balance of 0 uncovered.I think it would be easy to implement with a recursive function in other languages or with Excel formulas, but I'm unable to figure it out in a Power BI context.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Dec 2025 17:53:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4889866#M186160</guid>
      <dc:creator>Carlos_Noob</dc:creator>
      <dc:date>2025-12-01T17:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with some measures and logic in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4890611#M186175</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Your calculation cannot be done in DAX because DAX does not support recursive or conditional accumulation.&lt;BR /&gt;A Power BI Super User confirmed this:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Power BI/DAX does not support conditional aggregation. Only Power Query (List.Accumulate) can do that.&lt;/P&gt;&lt;P&gt;To build your logic (uncovered expenses, 3-month compensation, year-to-year carryover), you must implement it in Power Query, not DAX.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Microsoft Learn Source&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/powerquery-m/list-accumulate" target="_self"&gt;Power Query – List.Accumulate (supports recursion)&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Did it work? ✔ Give a Kudo • Mark as Solution – help others too!&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;A href="https://linktr.ee/RufydaRahma" target="_self"&gt;Rufyda Rahma | MIE&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Dec 2025 11:24:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4890611#M186175</guid>
      <dc:creator>Rufyda</dc:creator>
      <dc:date>2025-12-02T11:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with some measures and logic in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4892554#M186218</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1438760" data-lia-user-login="Carlos_Noob" class="lia-mention lia-mention-user"&gt;Carlos_Noob&lt;/a&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;&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;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="897332" data-lia-user-login="Rufyda" class="lia-mention lia-mention-user"&gt;Rufyda&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="568855" data-lia-user-login="Kedar_Pande" class="lia-mention lia-mention-user"&gt;Kedar_Pande&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="287307" data-lia-user-login="rodrigosan" class="lia-mention lia-mention-user"&gt;rodrigosan&lt;/a&gt;&amp;nbsp;Thanks for the inputs.&lt;/P&gt;
&lt;P&gt;I hope the information provided by users was helpful. If you still have questions, please don't hesitate to reach out to the community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Dec 2025 06:54:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4892554#M186218</guid>
      <dc:creator>v-priyankata</dc:creator>
      <dc:date>2025-12-04T06:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with some measures and logic in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4898035#M186376</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1438760" data-lia-user-login="Carlos_Noob" class="lia-mention lia-mention-user"&gt;Carlos_Noob&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope everything’s going smoothly on your end. I wanted to check if the issue got sorted. if you have any other issues please reach community.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Dec 2025 05:25:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-some-help-with-some-measures-and-logic-in-DAX/m-p/4898035#M186376</guid>
      <dc:creator>v-priyankata</dc:creator>
      <dc:date>2025-12-10T05:25:24Z</dc:date>
    </item>
  </channel>
</rss>

