<?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: DAX expression for subtracting 3 measures in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-expression-for-subtracting-3-measures/m-p/1827782#M38821</link>
    <description>&lt;P&gt;Right, I've managed to figure it out and I want to share just in case other people have the same issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue was my written off value was pulling a value based on the 'owes' amount. I scrapped this and started again with a boolean value instead, 1 for written off and 0 for not written off. This way I'm not causing a circular issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then used this expression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CALCULATE(SUMX('Table', 'Table'[Owes]-'Table'[Repaid]),'Table'[Written Off]=0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which then gave me the total remaining figure per employee.&lt;/P&gt;&lt;P&gt;Thank God.&lt;/P&gt;</description>
    <pubDate>Thu, 06 May 2021 14:29:44 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-05-06T14:29:44Z</dc:date>
    <item>
      <title>DAX expression for subtracting 3 measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-expression-for-subtracting-3-measures/m-p/1825216#M38737</link>
      <description>&lt;P&gt;Hi team&lt;/P&gt;&lt;P&gt;I'm hoping I can have some help. I know this achievable as I've done this before but unfortunately an IT mishap has led to me losing my data.&lt;/P&gt;&lt;P&gt;Here is an example of data:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I want to achieve the formula of Owes- Repaid - Written off to give me the amount remaining. The issue is that the repaid and written off values are measures and everything I try using SUMX or CALCULATE results in a circular dependency. I have literally spent all day trying to find the answer on here and I can't find it- I know I did a nested calculate/SUMX formula or something before. Everything I've found so far on the formula is coming up with the circular dependency.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help! It's driving me crazy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 15:23:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-expression-for-subtracting-3-measures/m-p/1825216#M38737</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-05T15:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: DAX expression for subtracting 3 measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-expression-for-subtracting-3-measures/m-p/1825276#M38738</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , as the last two are measures , this should work&lt;/P&gt;
&lt;P&gt;Sum(Table[Owes]) - [Repaid] - [Written off]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not&lt;/P&gt;
&lt;P&gt;Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 15:45:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-expression-for-subtracting-3-measures/m-p/1825276#M38738</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-05-05T15:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: DAX expression for subtracting 3 measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-expression-for-subtracting-3-measures/m-p/1825543#M38746</link>
      <description>&lt;P&gt;Good evening! Thank you for trying to help. Sadly that one gives me a Sum function only accepts column reference as an argument. So I amended to:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=SUM('Table'[Owes])-SUM('Table'[repaid] etc and that worked but gave me the grand total against every row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I really need is the SUMX function to give me the total per row instead!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=SUMX('Table'[Owes])-('Table'[repaid]&lt;/P&gt;&lt;P&gt;Gives me the same as above&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using the filter to filter by Number to give me just the figure per employee, and I tried the calculate function to filter but still to no avail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sadly I can't share the data due to confidentiality, but any suggestions would be very, very well received!!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 18:07:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-expression-for-subtracting-3-measures/m-p/1825543#M38746</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-05T18:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: DAX expression for subtracting 3 measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-expression-for-subtracting-3-measures/m-p/1827782#M38821</link>
      <description>&lt;P&gt;Right, I've managed to figure it out and I want to share just in case other people have the same issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue was my written off value was pulling a value based on the 'owes' amount. I scrapped this and started again with a boolean value instead, 1 for written off and 0 for not written off. This way I'm not causing a circular issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then used this expression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CALCULATE(SUMX('Table', 'Table'[Owes]-'Table'[Repaid]),'Table'[Written Off]=0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which then gave me the total remaining figure per employee.&lt;/P&gt;&lt;P&gt;Thank God.&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 14:29:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-expression-for-subtracting-3-measures/m-p/1827782#M38821</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-06T14:29:44Z</dc:date>
    </item>
  </channel>
</rss>

