<?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 Help with manipulating  data and then saving it in 2 different columns in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-manipulating-data-and-then-saving-it-in-2-different/m-p/249929#M1208683</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Darius&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks I appreciate this. I am in the process of replacing my code. One more question please. In the statement you have given me it is looking for document types G2 B3 RE and S1. If I want to turn this code so that it uses all documents that are not G2 B3 RE and S1 - how do I do this? In other words. My old code and the new code you have given me is:&lt;/P&gt;&lt;P&gt;Old&lt;/P&gt;&lt;P&gt;// IF ([Billing Type] = 'G2' OR [Billing Type] = 'B3' OR [Billing Type] = 'RE' OR [Billing Type] = 'S1',&lt;BR /&gt;// [CostTempOut],&lt;BR /&gt;// [CostTempOut] = ' ')&lt;BR /&gt;// AS [Billed Outgoing Value Cost Gross]&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;New&lt;/P&gt;&lt;P&gt;IF(INDEX('|G2|B3|RE|S1|', [Billing Type]) &amp;gt; 0, CostTempOut) AS [Billed Outgoing Value Cost Gross]&lt;/P&gt;&lt;P&gt;Now I want to do the same for Billed Incoming Value Cost Gross&lt;/P&gt;&lt;P&gt;Old&lt;/P&gt;&lt;P&gt;// IF ([Billing Type] = 'G2' OR [Billing Type] = 'B3' OR [Billing Type] = 'RE' OR [Billing Type] = 'S1',&lt;BR /&gt;// [CostTempIn] = ' ',&lt;BR /&gt;// [CostTempIn]*-1)&lt;BR /&gt;// AS [Billed Incoming Value Cost Gross],&lt;/P&gt;&lt;P&gt;New&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;Many thanks Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Apr 2010 08:03:51 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-04-15T08:03:51Z</dc:date>
    <item>
      <title>Help with manipulating  data and then saving it in 2 different columns</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-manipulating-data-and-then-saving-it-in-2-different/m-p/249926#M1208680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;Hi, I am new to QlikView and I am in the process of creating my first map and now my first post.&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;My problem is with coding. What I am trying to achieve is:&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt; tab-stops: 75.75pt; mso-layout-grid-align: none;"&gt;Take my source information (SalesTempOut/CostTempOut) and then split and save it as two new fields (Billed Outgoing Value Gross) and (Billed Outgoing Value Cost Gross). When doing this I need to manipulate the values. For -&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt; tab-stops: 75.75pt; mso-layout-grid-align: none;"&gt;(Billed Outgoing Value Gross)&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt; tab-stops: 75.75pt; mso-layout-grid-align: none;"&gt;If a credit type document i.e the header (Billing Type) = G2 or B3 or Re or S1 multiple by -1 to change the value to a negative value&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt; tab-stops: 75.75pt; mso-layout-grid-align: none;"&gt;Else i.e. all other document types (normal invoices) = should clear the value&lt;/P&gt;&lt;P&gt;(Billed Outgoing Value Cost Gross)&lt;/P&gt;&lt;P&gt;If a credit type document i.e the header (Billing Type) = G2 or B3 or Re or S1 leave the value as it is i.e. it will be a positive value&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt; tab-stops: 75.75pt; mso-layout-grid-align: none;"&gt;Else i.e. all other document types (normal invoices) = should clear the value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would then result in me having two columns for credits only - Negative amounts for the Values and positive amounts for the costs. I am then trying to do the same for invoices, ending up with a total of 4 columns for Invoice (Value and Costs) and Credits (Value and Costs)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Extract of my code below does not work - Please help me with the best practice code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards Steve&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;/I&gt;[VBRP Bill Doc Item]:&lt;/P&gt;&lt;P style="font-weight: bold"&gt;LOAD&lt;/P&gt;&lt;P&gt;FKART &lt;B&gt;AS&lt;/B&gt; [Billing Type],&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;WVWR &lt;B&gt;AS&lt;/B&gt; [CostTempIn],&lt;/P&gt;&lt;P&gt;WAVWR &lt;B&gt;AS&lt;/B&gt; [CostTempOut],&lt;/P&gt;&lt;P&gt;NETWR &lt;B&gt;as&lt;/B&gt; [SalesTempIn],&lt;/P&gt;&lt;P&gt;NETWR &lt;B&gt;as&lt;/B&gt; [SalesTempOut],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ([Billing Type] = 'G2' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'B3' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'RE' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'S1',&lt;/P&gt;&lt;P&gt;[SalesTempIn] = 0,&lt;/P&gt;&lt;P&gt;IF ([Billing Type] &amp;lt;&amp;gt; 'G2' &lt;B&gt;OR&lt;/B&gt; [Billing Type] &amp;lt;&amp;gt; 'B3' &lt;B&gt;OR&lt;/B&gt; [Billing Type] &amp;lt;&amp;gt; 'RE' &lt;B&gt;OR&lt;/B&gt; [Billing Type] &amp;lt;&amp;gt; 'S1',&lt;/P&gt;&lt;P&gt;[SalesTempIn],&lt;/P&gt;&lt;P&gt;[SalesTempIn]))&lt;/P&gt;&lt;P&gt;&lt;B&gt;AS&lt;/B&gt; [Billed Incoming Value Gross],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ([Billing Type] = 'G2' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'B3' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'RE' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'S1',&lt;/P&gt;&lt;P&gt;[CostTempIn] = 0,&lt;/P&gt;&lt;P&gt;IF ([Billing Type] &amp;lt;&amp;gt; 'G2' &lt;B&gt;OR&lt;/B&gt; [Billing Type] &amp;lt;&amp;gt; 'B3' &lt;B&gt;OR&lt;/B&gt; [Billing Type] &amp;lt;&amp;gt; 'RE' &lt;B&gt;OR&lt;/B&gt; [Billing Type] &amp;lt;&amp;gt; 'S1',&lt;/P&gt;&lt;P&gt;[CostTempIn]*-1,&lt;/P&gt;&lt;P&gt;[CostTempIn]))&lt;/P&gt;&lt;P&gt;&lt;B&gt;AS&lt;/B&gt; [Billed Incoming Value Cost Gross],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ([Billing Type] = 'G2' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'B3' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'RE' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'S1',&lt;/P&gt;&lt;P&gt;[SalesTempOut]*-1,&lt;/P&gt;&lt;P&gt;IF ([Billing Type] &amp;lt;&amp;gt; 'G2' &lt;B&gt;OR&lt;/B&gt; [Billing Type] &amp;lt;&amp;gt; 'B3' &lt;B&gt;OR&lt;/B&gt; [Billing Type] &amp;lt;&amp;gt; 'RE' &lt;B&gt;OR&lt;/B&gt; [Billing Type] &amp;lt;&amp;gt; 'S1',&lt;/P&gt;&lt;P&gt;[SalesTempOut] = 0,&lt;/P&gt;&lt;P&gt;[SalesTempOut]))&lt;/P&gt;&lt;P&gt;&lt;B&gt;AS&lt;/B&gt; [Billed Outgoing Value Gross],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ([Billing Type] = 'G2' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'B3' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'RE' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'S1',&lt;/P&gt;&lt;P&gt;[CostTempOut],&lt;/P&gt;&lt;P&gt;IF ([Billing Type] &amp;lt;&amp;gt; 'G2' &lt;B&gt;OR&lt;/B&gt; [Billing Type] &amp;lt;&amp;gt; 'B3' &lt;B&gt;OR&lt;/B&gt; [Billing Type] &amp;lt;&amp;gt; 'RE' &lt;B&gt;OR&lt;/B&gt; [Billing Type] &amp;lt;&amp;gt; 'S1',&lt;/P&gt;&lt;P&gt;[CostTempOut] = 0,&lt;/P&gt;&lt;P&gt;[CostTempOut]))&lt;/P&gt;&lt;P&gt;&lt;B&gt;AS&lt;/B&gt; [Billed Outgoing Value Cost Gross]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Apr 2010 11:37:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-manipulating-data-and-then-saving-it-in-2-different/m-p/249926#M1208680</guid>
      <dc:creator />
      <dc:date>2010-04-01T11:37:35Z</dc:date>
    </item>
    <item>
      <title>Help with manipulating  data and then saving it in 2 different columns</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-manipulating-data-and-then-saving-it-in-2-different/m-p/249927#M1208681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have done the following for anyone who want this. Also as I am new to this if anyone has a more efficient way of getting the result please update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;IF ([Billing Type] = 'G2' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'B3' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'RE' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'S1',&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;[SalesTempIn] = ' ',&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;[SalesTempIn])&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;AS&lt;/B&gt; [Billed Incoming Value Gross],&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;IF ([Billing Type] = 'G2' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'B3' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'RE' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'S1',&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;[CostTempIn] = ' ',&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;[CostTempIn]*-1)&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;AS&lt;/B&gt; [Billed Incoming Value Cost Gross],&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;IF ([Billing Type] = 'G2' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'B3' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'RE' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'S1',&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;[SalesTempOut]*-1,&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;[SalesTempOut] = ' ')&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;AS&lt;/B&gt; [Billed Outgoing Value Gross],&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;IF ([Billing Type] = 'G2' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'B3' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'RE' &lt;B&gt;OR&lt;/B&gt; [Billing Type] = 'S1',&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;[CostTempOut],&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;[CostTempOut] = ' ')&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;AS&lt;/B&gt; [Billed Outgoing Value Cost Gross]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Apr 2010 11:11:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-manipulating-data-and-then-saving-it-in-2-different/m-p/249927#M1208681</guid>
      <dc:creator />
      <dc:date>2010-04-02T11:11:40Z</dc:date>
    </item>
    <item>
      <title>Help with manipulating  data and then saving it in 2 different columns</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-manipulating-data-and-then-saving-it-in-2-different/m-p/249928#M1208682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;It could be done using following syntax&lt;/P&gt;&lt;P&gt;IF(INDEX('|G2|B3|RE|S1|', [Billing Type]) &amp;gt; 0, CostTempOut) AS [Billed Outgoing...]&lt;/P&gt;&lt;P&gt;Function INDEX will search first argument to look if it contains second one, and if it finds, then returns value greater than 0.&lt;/P&gt;&lt;P&gt;Darius&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Apr 2010 13:00:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-manipulating-data-and-then-saving-it-in-2-different/m-p/249928#M1208682</guid>
      <dc:creator>d_pranskus</dc:creator>
      <dc:date>2010-04-02T13:00:28Z</dc:date>
    </item>
    <item>
      <title>Help with manipulating  data and then saving it in 2 different columns</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-manipulating-data-and-then-saving-it-in-2-different/m-p/249929#M1208683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Darius&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks I appreciate this. I am in the process of replacing my code. One more question please. In the statement you have given me it is looking for document types G2 B3 RE and S1. If I want to turn this code so that it uses all documents that are not G2 B3 RE and S1 - how do I do this? In other words. My old code and the new code you have given me is:&lt;/P&gt;&lt;P&gt;Old&lt;/P&gt;&lt;P&gt;// IF ([Billing Type] = 'G2' OR [Billing Type] = 'B3' OR [Billing Type] = 'RE' OR [Billing Type] = 'S1',&lt;BR /&gt;// [CostTempOut],&lt;BR /&gt;// [CostTempOut] = ' ')&lt;BR /&gt;// AS [Billed Outgoing Value Cost Gross]&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;New&lt;/P&gt;&lt;P&gt;IF(INDEX('|G2|B3|RE|S1|', [Billing Type]) &amp;gt; 0, CostTempOut) AS [Billed Outgoing Value Cost Gross]&lt;/P&gt;&lt;P&gt;Now I want to do the same for Billed Incoming Value Cost Gross&lt;/P&gt;&lt;P&gt;Old&lt;/P&gt;&lt;P&gt;// IF ([Billing Type] = 'G2' OR [Billing Type] = 'B3' OR [Billing Type] = 'RE' OR [Billing Type] = 'S1',&lt;BR /&gt;// [CostTempIn] = ' ',&lt;BR /&gt;// [CostTempIn]*-1)&lt;BR /&gt;// AS [Billed Incoming Value Cost Gross],&lt;/P&gt;&lt;P&gt;New&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;Many thanks Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Apr 2010 08:03:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-manipulating-data-and-then-saving-it-in-2-different/m-p/249929#M1208683</guid>
      <dc:creator />
      <dc:date>2010-04-15T08:03:51Z</dc:date>
    </item>
  </channel>
</rss>

