<?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 If statement - Changing a field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-statement-Changing-a-field/m-p/146863#M25354</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;Very new to Qlikview and this is my first question.&lt;/P&gt;&lt;P&gt;I am reading from a SAP SQL database and I have monetary values I need to use. These are all positive values and there is a seperate field with an indicator which identifies if the field is really a negative value.&lt;/P&gt;&lt;P&gt;I would normally write some code which would say the following:&lt;/P&gt;&lt;P&gt;IF SHKZG = 'H'.&lt;/P&gt;&lt;P&gt;WRBTR = 0 - WRTBR .&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where SHKZG if the indicator field and WRBTR is the value field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I do this in Qlikview, ideally in a scritp which would be saving to a QVD file for later use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in anticipation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Jun 2009 13:27:41 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-06-16T13:27:41Z</dc:date>
    <item>
      <title>If statement - Changing a field</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-Changing-a-field/m-p/146863#M25354</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;Very new to Qlikview and this is my first question.&lt;/P&gt;&lt;P&gt;I am reading from a SAP SQL database and I have monetary values I need to use. These are all positive values and there is a seperate field with an indicator which identifies if the field is really a negative value.&lt;/P&gt;&lt;P&gt;I would normally write some code which would say the following:&lt;/P&gt;&lt;P&gt;IF SHKZG = 'H'.&lt;/P&gt;&lt;P&gt;WRBTR = 0 - WRTBR .&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where SHKZG if the indicator field and WRBTR is the value field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I do this in Qlikview, ideally in a scritp which would be saving to a QVD file for later use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in anticipation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2009 13:27:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-Changing-a-field/m-p/146863#M25354</guid>
      <dc:creator />
      <dc:date>2009-06-16T13:27:41Z</dc:date>
    </item>
    <item>
      <title>If statement - Changing a field</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-Changing-a-field/m-p/146864#M25355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paulw,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the load script you could add something like:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF(SHKZG = 'H',0-WRTBR,WRTBR) as RealWRBTR,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By doing this you will have a new field called RealWRBTR that has a negative value if the SHKZG is 'H' or has a positive value in all other cases.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joao&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2009 14:11:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-Changing-a-field/m-p/146864#M25355</guid>
      <dc:creator />
      <dc:date>2009-06-16T14:11:38Z</dc:date>
    </item>
    <item>
      <title>If statement - Changing a field</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-Changing-a-field/m-p/146865#M25356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jalmeida,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for your quick response, it works perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarda,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paulw&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2009 14:47:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-Changing-a-field/m-p/146865#M25356</guid>
      <dc:creator />
      <dc:date>2009-06-16T14:47:34Z</dc:date>
    </item>
  </channel>
</rss>

