<?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: Create new column with negative and positive amounts in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Create-new-column-with-negative-and-positive-amounts/m-p/1394839#M799150</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just create a flag within the load with something:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Type = 'D', -1, 1) as Flag&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then you could multiply with it in the expresions, for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(Amount * Flag) // within the Balance expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Dec 2017 16:27:28 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2017-12-13T16:27:28Z</dc:date>
    <item>
      <title>Create new column with negative and positive amounts</title>
      <link>https://community.qlik.com/t5/QlikView/Create-new-column-with-negative-and-positive-amounts/m-p/1394838#M799149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have excel files with example like below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="337"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" width="64"&gt;Time&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;Type&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;Amount&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;Balance&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17"&gt;10:01&lt;/TD&gt;&lt;TD class="xl65"&gt;D&lt;/TD&gt;&lt;TD class="xl65"&gt;100&lt;/TD&gt;&lt;TD class="xl65"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17"&gt;10:02&lt;/TD&gt;&lt;TD class="xl65"&gt;D&lt;/TD&gt;&lt;TD class="xl65"&gt;50&lt;/TD&gt;&lt;TD class="xl65"&gt;150&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17"&gt;10:03&lt;/TD&gt;&lt;TD class="xl65"&gt;C&lt;/TD&gt;&lt;TD class="xl65"&gt;100&lt;/TD&gt;&lt;TD class="xl65"&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I need to identify the negative (D) amounts in able to create correct Running Balance in my application.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;My idea is to create a new column to create a running balance the will show me the running balance so i can identify the correct MAX and MIN.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="337"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" width="64"&gt;Time&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;Type&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;Amount&lt;/TD&gt;&lt;TD class="xl67" width="81"&gt;New Amount&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;Balance&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17"&gt;10:01&lt;/TD&gt;&lt;TD class="xl65"&gt;D&lt;/TD&gt;&lt;TD class="xl65"&gt;100&lt;/TD&gt;&lt;TD class="xl67"&gt;-100&lt;/TD&gt;&lt;TD class="xl65"&gt;-100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17"&gt;10:02&lt;/TD&gt;&lt;TD class="xl65"&gt;D&lt;/TD&gt;&lt;TD class="xl65"&gt;50&lt;/TD&gt;&lt;TD class="xl67"&gt;-50&lt;/TD&gt;&lt;TD class="xl65"&gt;-150&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17"&gt;10:03&lt;/TD&gt;&lt;TD class="xl65"&gt;C&lt;/TD&gt;&lt;TD class="xl65"&gt;100&lt;/TD&gt;&lt;TD class="xl67"&gt;100&lt;/TD&gt;&lt;TD class="xl65"&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&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/Create-new-column-with-negative-and-positive-amounts/m-p/1394838#M799149</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Create new column with negative and positive amounts</title>
      <link>https://community.qlik.com/t5/QlikView/Create-new-column-with-negative-and-positive-amounts/m-p/1394839#M799150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just create a flag within the load with something:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Type = 'D', -1, 1) as Flag&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then you could multiply with it in the expresions, for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(Amount * Flag) // within the Balance expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Dec 2017 16:27:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-new-column-with-negative-and-positive-amounts/m-p/1394839#M799150</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-12-13T16:27:28Z</dc:date>
    </item>
  </channel>
</rss>

