<?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: Sum and Difference based on column field in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Sum-and-Difference-based-on-column-field/m-p/4275091#M58203</link>
    <description>&lt;P&gt;Thanks for the reply from KNP&amp;nbsp;, please allow me to provide another insight:&amp;nbsp; &lt;BR /&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="401438" data-lia-user-login="jenani_user" class="lia-mention lia-mention-user"&gt;jenani_user&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create calculated table.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table =
var _table1=
SUMMARIZE(
    'Input',
    [A],
    "C","B+C",
    "B",
    SUMX(FILTER('Input',[A]=EARLIER([A])&amp;amp;&amp;amp;[C]="B"),[B])+
    SUMX(FILTER('Input',[A]=EARLIER([A])&amp;amp;&amp;amp;[C]="C"),[B]))
var _table2=
SUMMARIZE(
    _table1,
    [A],
    "C","A-(B+C)",
    "B",
    SUMX(FILTER('Input',[A]=EARLIER([A])&amp;amp;&amp;amp;[C]="A"),[B])-
    SUMX(FILTER(_table1,[A]=EARLIER([A])&amp;amp;&amp;amp;[C]="B+C"),[B]))
var _table=
SUMMARIZE(
    'Input',[A],[C],[B])
return
UNION(
    _table,_table1,_table2)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2. Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
    <pubDate>Fri, 08 Nov 2024 06:26:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-08T06:26:33Z</dc:date>
    <item>
      <title>Sum and Difference based on column field</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Sum-and-Difference-based-on-column-field/m-p/4273994#M58192</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have table Similar to the Input image shown , how do I obtain the output similar to the image shown,&lt;/P&gt;&lt;P&gt;INPUT:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;OUTPUT:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly suggest any idea as there are around 10 columns similar to values(in B column of input)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Jen&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2024 11:58:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Sum-and-Difference-based-on-column-field/m-p/4273994#M58192</guid>
      <dc:creator>jenani_user</dc:creator>
      <dc:date>2024-11-07T11:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and Difference based on column field</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Sum-and-Difference-based-on-column-field/m-p/4274739#M58201</link>
      <description>&lt;P&gt;I'm not sure how complex your actual scenario is but have a look at the attached and see if it helps at all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 00:53:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Sum-and-Difference-based-on-column-field/m-p/4274739#M58201</guid>
      <dc:creator>KNP</dc:creator>
      <dc:date>2024-11-08T00:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and Difference based on column field</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Sum-and-Difference-based-on-column-field/m-p/4275091#M58203</link>
      <description>&lt;P&gt;Thanks for the reply from KNP&amp;nbsp;, please allow me to provide another insight:&amp;nbsp; &lt;BR /&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="401438" data-lia-user-login="jenani_user" class="lia-mention lia-mention-user"&gt;jenani_user&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create calculated table.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table =
var _table1=
SUMMARIZE(
    'Input',
    [A],
    "C","B+C",
    "B",
    SUMX(FILTER('Input',[A]=EARLIER([A])&amp;amp;&amp;amp;[C]="B"),[B])+
    SUMX(FILTER('Input',[A]=EARLIER([A])&amp;amp;&amp;amp;[C]="C"),[B]))
var _table2=
SUMMARIZE(
    _table1,
    [A],
    "C","A-(B+C)",
    "B",
    SUMX(FILTER('Input',[A]=EARLIER([A])&amp;amp;&amp;amp;[C]="A"),[B])-
    SUMX(FILTER(_table1,[A]=EARLIER([A])&amp;amp;&amp;amp;[C]="B+C"),[B]))
var _table=
SUMMARIZE(
    'Input',[A],[C],[B])
return
UNION(
    _table,_table1,_table2)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2. Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 06:26:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Sum-and-Difference-based-on-column-field/m-p/4275091#M58203</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-08T06:26:33Z</dc:date>
    </item>
  </channel>
</rss>

