<?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 Sum based on different columns in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-based-on-different-columns/m-p/118942#M760548</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Community&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In short I have a table with cities FROM and TO and the amount of goods that is transported between these cities:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="173"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="21" width="72"&gt;PlaceFrom&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="55"&gt;PlaceTo&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="46"&gt;Goods&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="20"&gt;A&lt;/TD&gt;&lt;TD class="xl67" style="border-left: none;"&gt;B&lt;/TD&gt;&lt;TD class="xl68" style="border-left: none;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="20" style="border-top: none;"&gt;C&lt;/TD&gt;&lt;TD class="xl70" style="border-top: none; border-left: none;"&gt;D&lt;/TD&gt;&lt;TD class="xl71" style="border-top: none; border-left: none;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="20" style="border-top: none;"&gt;B&lt;/TD&gt;&lt;TD class="xl70" style="border-top: none; border-left: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl71" style="border-top: none; border-left: none;"&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl72" height="21" style="border-top: none;"&gt;E&lt;/TD&gt;&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;D&lt;/TD&gt;&lt;TD class="xl74" style="border-top: none; border-left: none;"&gt;&lt;P&gt;30&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want a subtotal of goods of each city whereas goods send (PlaceFrom) = minus and goods received (PlaceTo) = plus.&lt;/P&gt;&lt;P&gt;So I want a 2nd table with this result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 117px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl71" height="21" width="40"&gt;Place&lt;/TD&gt;&lt;TD class="xl72" style="border-left: none;" width="77"&gt;GoodsTotal&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="border-left: none;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;B&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;-10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;C&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;-20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;D&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="21" style="border-top: none;"&gt;E&lt;/TD&gt;&lt;TD class="xl70" style="border-top: none; border-left: none;"&gt;-30&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I get this second table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>jharke</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Sum based on different columns</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-based-on-different-columns/m-p/118942#M760548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Community&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In short I have a table with cities FROM and TO and the amount of goods that is transported between these cities:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="173"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="21" width="72"&gt;PlaceFrom&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="55"&gt;PlaceTo&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="46"&gt;Goods&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="20"&gt;A&lt;/TD&gt;&lt;TD class="xl67" style="border-left: none;"&gt;B&lt;/TD&gt;&lt;TD class="xl68" style="border-left: none;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="20" style="border-top: none;"&gt;C&lt;/TD&gt;&lt;TD class="xl70" style="border-top: none; border-left: none;"&gt;D&lt;/TD&gt;&lt;TD class="xl71" style="border-top: none; border-left: none;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="20" style="border-top: none;"&gt;B&lt;/TD&gt;&lt;TD class="xl70" style="border-top: none; border-left: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl71" style="border-top: none; border-left: none;"&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl72" height="21" style="border-top: none;"&gt;E&lt;/TD&gt;&lt;TD class="xl73" style="border-top: none; border-left: none;"&gt;D&lt;/TD&gt;&lt;TD class="xl74" style="border-top: none; border-left: none;"&gt;&lt;P&gt;30&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want a subtotal of goods of each city whereas goods send (PlaceFrom) = minus and goods received (PlaceTo) = plus.&lt;/P&gt;&lt;P&gt;So I want a 2nd table with this result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 117px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl71" height="21" width="40"&gt;Place&lt;/TD&gt;&lt;TD class="xl72" style="border-left: none;" width="77"&gt;GoodsTotal&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="border-left: none;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;B&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;-10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;C&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;-20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;D&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="21" style="border-top: none;"&gt;E&lt;/TD&gt;&lt;TD class="xl70" style="border-top: none; border-left: none;"&gt;-30&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I get this second table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-based-on-different-columns/m-p/118942#M760548</guid>
      <dc:creator>jharke</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sum based on different columns</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-based-on-different-columns/m-p/118943#M760549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the script or front-end chart?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2018 12:06:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-based-on-different-columns/m-p/118943#M760549</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2018-08-08T12:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: Sum based on different columns</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-based-on-different-columns/m-p/118944#M760550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be create a link table like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;LOAD RowNo() as Key,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt; *;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;LOAD * INLINE [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PlaceFrom, PlaceTo, Goods&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A, B, 20&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; C, D, 20&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; B, A, 30&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; E, D, 30&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;LinkTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;LOAD Key,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt; PlaceFrom as Place,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt; 'From' as Flag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Resident Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Concatenate (LinkTable)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;LOAD Key,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt; PlaceTo as Place,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt; 'To' as Flag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Resident Table;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Place&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;Flag = {'From'}&amp;gt;}Goods) - Sum({&amp;lt;Flag = {'To'}&amp;gt;}Goods)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/210243_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2018 12:14:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-based-on-different-columns/m-p/118944#M760550</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-08-08T12:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Sum based on different columns</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-based-on-different-columns/m-p/118945#M760551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My bad, you might need&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=Sum({&amp;lt;Flag = {'To'}&amp;gt;}Goods) - Sum({&amp;lt;Flag = {'From'}&amp;gt;}Goods)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2018 12:16:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-based-on-different-columns/m-p/118945#M760551</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-08-08T12:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Sum based on different columns</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-based-on-different-columns/m-p/118946#M760552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At first I would liked it to have it in on the UI side. I mentioned 'goods' in my question, but actually it is about pallet packing and sometimes we get pallets in return at the deliveryside and there are some other issues that I have to take into consideration in an expression right now also.&lt;/P&gt;&lt;P&gt;But this 'sum based on different fields' was the hardest part for me. When it is in the script, it is 'secured safely' so I will try the suggestion of Sunny also.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2018 12:55:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-based-on-different-columns/m-p/118946#M760552</guid>
      <dc:creator>jharke</dc:creator>
      <dc:date>2018-08-08T12:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sum based on different columns</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-based-on-different-columns/m-p/118947#M760553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works great! Fantastic!&lt;/P&gt;&lt;P&gt;Something like this was on my mind, but now I have a 'script to express'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-happy-&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2018 14:13:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-based-on-different-columns/m-p/118947#M760553</guid>
      <dc:creator>jharke</dc:creator>
      <dc:date>2018-08-08T14:13:17Z</dc:date>
    </item>
  </channel>
</rss>

