<?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 IF fieldvalue=fieldvalue then subtract from the right fieldvalue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-IF-fieldvalue-fieldvalue-then-subtract-from-the-right/m-p/1571914#M598120</link>
    <description>&lt;P&gt;hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;this expression will work for you :&lt;/P&gt;&lt;P&gt;Sum(field4)- sum(if(field3=Field1,[Field2]))&lt;/P&gt;&lt;P&gt;but in general when you take into account the performance of the model , you'll be better serve to connect the tables&amp;nbsp;&lt;/P&gt;&lt;P&gt;even with a complex key that include the dates&lt;/P&gt;</description>
    <pubDate>Tue, 23 Apr 2019 08:01:36 GMT</pubDate>
    <dc:creator>lironbaram</dc:creator>
    <dc:date>2019-04-23T08:01:36Z</dc:date>
    <item>
      <title>Sum IF fieldvalue=fieldvalue then subtract from the right fieldvalue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-fieldvalue-fieldvalue-then-subtract-from-the-right/m-p/1571909#M598119</link>
      <description>&lt;P&gt;Hey Experts,&lt;/P&gt;&lt;P&gt;Im new to qlikview but hopefully I'll get better at it soon.&lt;/P&gt;&lt;P&gt;Is there by anychance that you can get this to work?:&lt;/P&gt;&lt;P&gt;Field1,Field2:&lt;/P&gt;&lt;P&gt;A,1&lt;/P&gt;&lt;P&gt;B,2&lt;/P&gt;&lt;P&gt;C,3&lt;/P&gt;&lt;P&gt;C,2&lt;/P&gt;&lt;P&gt;C,1&lt;/P&gt;&lt;P&gt;Total:9&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;field3,field4&lt;/P&gt;&lt;P&gt;A,100&lt;/P&gt;&lt;P&gt;B,200&lt;/P&gt;&lt;P&gt;C,400&lt;/P&gt;&lt;P&gt;i wanna sum all field2s depending on Field1&lt;/P&gt;&lt;P&gt;then i wanna&amp;nbsp;subtract field2 from field4 depending if the field1=field3.&lt;/P&gt;&lt;P&gt;All this above without linking them together(it will get a loop because all of this is linked by dates.&lt;/P&gt;&lt;P&gt;I got it to work partly. Just that when i use this field2-field4 it&amp;nbsp;subtract the total amount of&amp;nbsp; field2 and&amp;nbsp;subtract it from each field3/4&lt;/P&gt;&lt;P&gt;makes the table look like this:&lt;/P&gt;&lt;P&gt;A,91&lt;/P&gt;&lt;P&gt;B,191&lt;/P&gt;&lt;P&gt;C,391&lt;/P&gt;&lt;P&gt;instead of this:&lt;/P&gt;&lt;P&gt;A,99&lt;/P&gt;&lt;P&gt;B,198&lt;/P&gt;&lt;P&gt;C,394&lt;/P&gt;&lt;P&gt;Hopefully someone know how to do this.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 07:47:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-fieldvalue-fieldvalue-then-subtract-from-the-right/m-p/1571909#M598119</guid>
      <dc:creator>ontoit7331</dc:creator>
      <dc:date>2019-04-23T07:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sum IF fieldvalue=fieldvalue then subtract from the right fieldvalue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-fieldvalue-fieldvalue-then-subtract-from-the-right/m-p/1571914#M598120</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;this expression will work for you :&lt;/P&gt;&lt;P&gt;Sum(field4)- sum(if(field3=Field1,[Field2]))&lt;/P&gt;&lt;P&gt;but in general when you take into account the performance of the model , you'll be better serve to connect the tables&amp;nbsp;&lt;/P&gt;&lt;P&gt;even with a complex key that include the dates&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 08:01:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-fieldvalue-fieldvalue-then-subtract-from-the-right/m-p/1571914#M598120</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2019-04-23T08:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: Sum IF fieldvalue=fieldvalue then subtract from the right fieldvalue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-fieldvalue-fieldvalue-then-subtract-from-the-right/m-p/1571916#M598121</link>
      <description>Hey,&lt;BR /&gt;&lt;BR /&gt;I already use that expression and it subtract the total amount of field2 with every field4.&lt;BR /&gt;Maybe its the only way? To find a way to make a key in the script?</description>
      <pubDate>Tue, 23 Apr 2019 08:09:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-fieldvalue-fieldvalue-then-subtract-from-the-right/m-p/1571916#M598121</guid>
      <dc:creator>ontoit7331</dc:creator>
      <dc:date>2019-04-23T08:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Sum IF fieldvalue=fieldvalue then subtract from the right fieldvalue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-fieldvalue-fieldvalue-then-subtract-from-the-right/m-p/1572498#M598122</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;this expression works&amp;nbsp; exactly as you want&lt;/P&gt;&lt;P&gt;i tested it in an app see below screen shot&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Untitled.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/10763iA9EE6668BA16A9DB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also attach is a qlikview model&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 07:40:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-fieldvalue-fieldvalue-then-subtract-from-the-right/m-p/1572498#M598122</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2019-04-24T07:40:30Z</dc:date>
    </item>
  </channel>
</rss>

