<?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: Circular dependency workaround for Formula in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Circular-dependency-workaround-for-Formula/m-p/2721303#M83002</link>
    <description>&lt;P&gt;Thank you for your help! The YTD Commission Paid wasn't populated, but I made a slight adjustment and it worked!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Aug 2022 18:54:28 GMT</pubDate>
    <dc:creator>Auto_queen</dc:creator>
    <dc:date>2022-08-23T18:54:28Z</dc:date>
    <item>
      <title>Circular dependency workaround for Formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Circular-dependency-workaround-for-Formula/m-p/2718472#M82812</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new to Dax and I was wondering if there is a workaround for the circular dependency issue I'm having.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To calculate what a sales person's commission will be for the month, I take their YTD Sales payable amount and subtract their YTD salary and what commission they have already been paid for the year. If it is a negative number then they are paid $0.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This Month's Commission Payable = YTD Sales Payable Amount - (YTD Salary Paid + YTD Commissions Paid)&lt;/P&gt;&lt;P&gt;If This Month's Commission Payable &amp;lt; 0, then $0, else&amp;nbsp;This Month's Commission Payable&lt;/P&gt;&lt;P&gt;YTD Commissions Paid = Running total of This Month's Commission Payable&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is that the YTD commission paid is based on this month's commission payable which is based on YTD commission paid, creating a circular dependency.&amp;nbsp; Is there a workaround for this or another way to go about the formulas?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is some sample data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Month&lt;/TD&gt;&lt;TD&gt;YTD Sales Payable&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;YTD Salary Paid&lt;/TD&gt;&lt;TD&gt;YTD Commission Paid&lt;/TD&gt;&lt;TD&gt;This Month's Commission Payable&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;January&lt;/TD&gt;&lt;TD&gt;$322.73&lt;/TD&gt;&lt;TD&gt;$5,000&lt;/TD&gt;&lt;TD&gt;$0&lt;/TD&gt;&lt;TD&gt;$0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;February&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;$12,219.74&lt;/TD&gt;&lt;TD&gt;$10,000&lt;/TD&gt;&lt;TD&gt;$0&lt;/TD&gt;&lt;TD&gt;$2,219.74&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;March&lt;/TD&gt;&lt;TD&gt;$25,402.15&lt;/TD&gt;&lt;TD&gt;$15,000&lt;/TD&gt;&lt;TD&gt;$2,219.74&lt;/TD&gt;&lt;TD&gt;$8,182.41&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;April&lt;/TD&gt;&lt;TD&gt;$48,177.31&lt;/TD&gt;&lt;TD&gt;$20,000&lt;/TD&gt;&lt;TD&gt;$10,402.15&lt;/TD&gt;&lt;TD&gt;$17,775.16&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;May&lt;/TD&gt;&lt;TD&gt;$52,058.58&lt;/TD&gt;&lt;TD&gt;$25,000&lt;/TD&gt;&lt;TD&gt;$28,177.31&lt;/TD&gt;&lt;TD&gt;$0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;June&lt;/TD&gt;&lt;TD&gt;$52,505.53&lt;/TD&gt;&lt;TD&gt;$30,000&lt;/TD&gt;&lt;TD&gt;$28,177.31&lt;/TD&gt;&lt;TD&gt;$0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;July&lt;/TD&gt;&lt;TD&gt;$59,360.60&lt;/TD&gt;&lt;TD&gt;$35,000&lt;/TD&gt;&lt;TD&gt;$28,177.31&lt;/TD&gt;&lt;TD&gt;$1,183.29&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Mon, 22 Aug 2022 23:32:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Circular-dependency-workaround-for-Formula/m-p/2718472#M82812</guid>
      <dc:creator>Auto_queen</dc:creator>
      <dc:date>2022-08-22T23:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Circular dependency workaround for Formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Circular-dependency-workaround-for-Formula/m-p/2718769#M82826</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="347629" data-lia-user-login="Auto_queen" class="lia-mention lia-mention-user"&gt;Auto_queen&lt;/a&gt; , You need to calculate &lt;/P&gt;
&lt;P&gt;if other are columns&lt;/P&gt;
&lt;P&gt;This Month's Commission Payable =&lt;/P&gt;
&lt;P&gt;var _date =&amp;nbsp; eomonth([Date], -1)&lt;/P&gt;
&lt;P&gt;var _value =Sum([YTD Sales Payable]) - Sum([YTD Salary Paid])&lt;/P&gt;
&lt;P&gt;return calculate( if(_value&amp;gt;0, _value,0) , Filter(Table, eomonth(Table[Date],0)&amp;nbsp; =_date))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in case others are measure&lt;/P&gt;
&lt;P&gt;calculate([YTD Sales Payable]- [YTD Salary Paid], previousmonth('Date'[Date]) ) //use date table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;as columns&lt;/P&gt;
&lt;P&gt;YTD Commission Paid =&lt;/P&gt;
&lt;P&gt;var _date =&amp;nbsp; eomonth([Date], -1)&lt;/P&gt;
&lt;P&gt;var _value =Sum([YTD Sales Payable]) - Sum([YTD Salary Paid])&lt;/P&gt;
&lt;P&gt;return calculate( Sum( if(_value&amp;gt;0, _value,0) ), Filter(Table, eomonth(Table[Date],0)&amp;nbsp; &amp;lt;=_date))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 03:35:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Circular-dependency-workaround-for-Formula/m-p/2718769#M82826</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-08-23T03:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: Circular dependency workaround for Formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Circular-dependency-workaround-for-Formula/m-p/2720229#M82920</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="347629" data-lia-user-login="Auto_queen" class="lia-mention lia-mention-user"&gt;Auto_queen&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please refer to attched sample file. Your actual case might be littele different depending in your real data and data model.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 12:30:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Circular-dependency-workaround-for-Formula/m-p/2720229#M82920</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-08-23T12:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Circular dependency workaround for Formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Circular-dependency-workaround-for-Formula/m-p/2721303#M83002</link>
      <description>&lt;P&gt;Thank you for your help! The YTD Commission Paid wasn't populated, but I made a slight adjustment and it worked!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 18:54:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Circular-dependency-workaround-for-Formula/m-p/2721303#M83002</guid>
      <dc:creator>Auto_queen</dc:creator>
      <dc:date>2022-08-23T18:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Circular dependency workaround for Formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Circular-dependency-workaround-for-Formula/m-p/2721304#M83003</link>
      <description>&lt;P&gt;Thank you for your help! This worked too!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 18:54:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Circular-dependency-workaround-for-Formula/m-p/2721304#M83003</guid>
      <dc:creator>Auto_queen</dc:creator>
      <dc:date>2022-08-23T18:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Circular dependency workaround for Formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Circular-dependency-workaround-for-Formula/m-p/2721445#M83015</link>
      <description>&lt;P&gt;Actually, For YTD Commission Paid for June and July the amount should stay $28,177.31 since that is what has been paid - no more and no less...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 20:23:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Circular-dependency-workaround-for-Formula/m-p/2721445#M83015</guid>
      <dc:creator>Auto_queen</dc:creator>
      <dc:date>2022-08-23T20:23:49Z</dc:date>
    </item>
  </channel>
</rss>

