<?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: Addition and Subtraction of fields to form a new field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Addition-and-Subtraction-of-fields-to-form-a-new-field/m-p/57282#M769657</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=RangeSum(Column1,Column2,&lt;STRONG&gt;-Column3&lt;/STRONG&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Jun 2018 10:32:45 GMT</pubDate>
    <dc:creator>shiveshsingh</dc:creator>
    <dc:date>2018-06-05T10:32:45Z</dc:date>
    <item>
      <title>Addition and Subtraction of fields to form a new field</title>
      <link>https://community.qlik.com/t5/QlikView/Addition-and-Subtraction-of-fields-to-form-a-new-field/m-p/57277#M769652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a column which will show 4 revenue values. I am doing it in script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With all conditions fulfilled I was able to get the 1st three fields;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Total Part Revenue = If(Geo = 'Coast', 'Total Part Revenue') as Total_Measure&lt;/P&gt;&lt;P&gt;2. T&lt;SPAN style="font-size: 13.3333px;"&gt;otal Revenue from Outside = If(Geo &amp;lt;&amp;gt; 'Coast', '&lt;SPAN style="font-size: 13.3333px;"&gt;T&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;otal Revenue from Outside&lt;/SPAN&gt;') as Total_Measure&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;3. Less Revenue = &lt;SPAN style="font-size: 13.3333px;"&gt;If(Geo &amp;lt;&amp;gt; 'Coast', Region = 'Aus', 'Less Revenue&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;') as &lt;SPAN style="font-size: 13.3333px;"&gt;Total_Measure&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;4. Overall Revenue = 1st Field + 2nd Field - 3rd Field.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I am struggling to get the 4th field. Any input would be of great help. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Total_Measure&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Revenue&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Total Part Revenue&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;150&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Total Revenue from Outside&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;70&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Less Revenue&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Overall Revenue(1st Field + 2nd Field - 3rd Field)&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/171708" target="_blank"&gt;stalwar1&lt;/A&gt;‌ &lt;A href="https://community.qlik.com/qlik-users/4484" target="_blank"&gt;stevedark&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;Thanks&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/Addition-and-Subtraction-of-fields-to-form-a-new-field/m-p/57277#M769652</guid>
      <dc:creator>amijit_hazarika</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Addition and Subtraction of fields to form a new field</title>
      <link>https://community.qlik.com/t5/QlikView/Addition-and-Subtraction-of-fields-to-form-a-new-field/m-p/57278#M769653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can you attach the sample data in text file?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2018 09:56:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Addition-and-Subtraction-of-fields-to-form-a-new-field/m-p/57278#M769653</guid>
      <dc:creator>qlikviewwizard</dc:creator>
      <dc:date>2018-06-05T09:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Addition and Subtraction of fields to form a new field</title>
      <link>https://community.qlik.com/t5/QlikView/Addition-and-Subtraction-of-fields-to-form-a-new-field/m-p/57279#M769654</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;My Organisation doesnt allow me to upload any data. However I have showed the sample possible data in the above question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2018 09:58:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Addition-and-Subtraction-of-fields-to-form-a-new-field/m-p/57279#M769654</guid>
      <dc:creator>amijit_hazarika</dc:creator>
      <dc:date>2018-06-05T09:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Addition and Subtraction of fields to form a new field</title>
      <link>https://community.qlik.com/t5/QlikView/Addition-and-Subtraction-of-fields-to-form-a-new-field/m-p/57280#M769655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use &lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;&lt;EM&gt;RangeSum(Total Part Revenue,Total Revenue from Outside,Less Revenue)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Hope this will help you.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2018 09:58:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Addition-and-Subtraction-of-fields-to-form-a-new-field/m-p/57280#M769655</guid>
      <dc:creator>qlikviewwizard</dc:creator>
      <dc:date>2018-06-05T09:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: Addition and Subtraction of fields to form a new field</title>
      <link>https://community.qlik.com/t5/QlikView/Addition-and-Subtraction-of-fields-to-form-a-new-field/m-p/57281#M769656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arjun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I need &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Total Part Revenue + Total Revenue from Outside - Less Revenue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rangesum() is not helping me in minus.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2018 10:07:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Addition-and-Subtraction-of-fields-to-form-a-new-field/m-p/57281#M769656</guid>
      <dc:creator>amijit_hazarika</dc:creator>
      <dc:date>2018-06-05T10:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Addition and Subtraction of fields to form a new field</title>
      <link>https://community.qlik.com/t5/QlikView/Addition-and-Subtraction-of-fields-to-form-a-new-field/m-p/57282#M769657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=RangeSum(Column1,Column2,&lt;STRONG&gt;-Column3&lt;/STRONG&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2018 10:32:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Addition-and-Subtraction-of-fields-to-form-a-new-field/m-p/57282#M769657</guid>
      <dc:creator>shiveshsingh</dc:creator>
      <dc:date>2018-06-05T10:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Addition and Subtraction of fields to form a new field</title>
      <link>https://community.qlik.com/t5/QlikView/Addition-and-Subtraction-of-fields-to-form-a-new-field/m-p/57283#M769658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is something you are looking to do in the script or front end of the app?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2018 11:13:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Addition-and-Subtraction-of-fields-to-form-a-new-field/m-p/57283#M769658</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-06-05T11:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Addition and Subtraction of fields to form a new field</title>
      <link>https://community.qlik.com/t5/QlikView/Addition-and-Subtraction-of-fields-to-form-a-new-field/m-p/57284#M769659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How did you map the revenue to the corresponding dimension values ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2018 11:50:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Addition-and-Subtraction-of-fields-to-form-a-new-field/m-p/57284#M769659</guid>
      <dc:creator>jyothish8807</dc:creator>
      <dc:date>2018-06-05T11:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Addition and Subtraction of fields to form a new field</title>
      <link>https://community.qlik.com/t5/QlikView/Addition-and-Subtraction-of-fields-to-form-a-new-field/m-p/57285#M769660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your best bet is probably going to be calculating it in the front end, but if you do want to do it in script you need to do the load from the data twice, with a concatenate, i.e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Revenue:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; Revenue,&lt;/P&gt;&lt;P&gt;&amp;nbsp; ... your if statements here ... as Total_Measure&lt;/P&gt;&lt;P&gt;FROM ... your data source ...&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE (Revenue)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; Revenue,&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'Overall Revenue' as Total_Measure&lt;/P&gt;&lt;P&gt;FROM ... your data source ...&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The massive risk and disadvantage of this approach is that all of the revenue will be double counted, so if you do a &lt;STRONG&gt;sum(Revenue)&lt;/STRONG&gt; in the front end, without &lt;STRONG&gt;Total_Measure&lt;/STRONG&gt; as a dimension you will get wrong values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not doing the concatenate, and having each value once would remove this risk.&amp;nbsp; You can then use the Total feature in Sense tables to show a totals row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Jun 2018 16:00:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Addition-and-Subtraction-of-fields-to-form-a-new-field/m-p/57285#M769660</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2018-06-09T16:00:27Z</dc:date>
    </item>
  </channel>
</rss>

