<?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: If statement?!? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-statement/m-p/798146#M1033667</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alt(Value*1000, -150000*(Category=30))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Jan 2015 15:44:13 GMT</pubDate>
    <dc:creator>MarcoWedel</dc:creator>
    <dc:date>2015-01-30T15:44:13Z</dc:date>
    <item>
      <title>If statement?!?</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement/m-p/798145#M1033666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've my data like following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 192px; border-collapse: collapse;"&gt;&lt;TBODY&gt;&lt;TR style="height: 13.2pt;"&gt;&lt;TD height="18" style="border: 0px windowtext; width: 48pt; height: 13.2pt; background-color: transparent;" width="64"&gt;&lt;SPAN style="color: #000000;"&gt;Cust ID&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px windowtext; width: 48pt; background-color: transparent;" width="64"&gt;&lt;SPAN style="color: #000000;"&gt;Category&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px windowtext; width: 48pt; background-color: transparent;" width="64"&gt;&lt;SPAN style="color: #000000;"&gt;Value&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 13.2pt;"&gt;&lt;TD align="right" height="18" style="border: 0px windowtext; height: 13.2pt; background-color: transparent;"&gt;&lt;SPAN style="color: #000000;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px windowtext; background-color: transparent;"&gt;&lt;SPAN style="color: #000000;"&gt;30&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 13.2pt;"&gt;&lt;TD align="right" height="18" style="border: 0px windowtext; height: 13.2pt; background-color: transparent;"&gt;&lt;SPAN style="color: #000000;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px windowtext; background-color: transparent;"&gt;&lt;SPAN style="color: #000000;"&gt;35&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px windowtext; background-color: transparent;"&gt;&lt;SPAN style="color: #000000;"&gt;75&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 13.2pt;"&gt;&lt;TD align="right" height="18" style="border: 0px windowtext; height: 13.2pt; background-color: transparent;"&gt;&lt;SPAN style="color: #000000;"&gt;3&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px windowtext; background-color: transparent;"&gt;&lt;SPAN style="color: #000000;"&gt;99&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 13.2pt;"&gt;&lt;TD align="right" height="18" style="border: 0px windowtext; height: 13.2pt; background-color: transparent;"&gt;&lt;SPAN style="color: #000000;"&gt;4&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px windowtext; background-color: transparent;"&gt;&lt;SPAN style="color: #000000;"&gt;30&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px windowtext; background-color: transparent;"&gt;&lt;SPAN style="color: #000000;"&gt;250&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 13.2pt;"&gt;&lt;TD align="right" height="18" style="border: 0px windowtext; height: 13.2pt; background-color: transparent;"&gt;&lt;SPAN style="color: #000000;"&gt;5&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px windowtext; background-color: transparent;"&gt;&lt;SPAN style="color: #000000;"&gt;35&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need help with the statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my report I want to present the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If category = 30&amp;nbsp; then present Value as 150 000&lt;/P&gt;&lt;P&gt;If category is &amp;lt;&amp;gt;30 then present Value as 0&lt;/P&gt;&lt;P&gt;If value has a number then present that number times 1000 (x1000). This last one shall overrule the previous statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure if it's best to do it in the loadscript and load it into colum "newValue" or if I should to it in the expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 14:37:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement/m-p/798145#M1033666</guid>
      <dc:creator />
      <dc:date>2015-01-30T14:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: If statement?!?</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement/m-p/798146#M1033667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alt(Value*1000, -150000*(Category=30))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 15:44:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement/m-p/798146#M1033667</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2015-01-30T15:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: If statement?!?</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement/m-p/798147#M1033668</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;You'd better calculate a field NewValue in the script.&lt;/P&gt;&lt;P&gt;Use the following script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Isnull(&lt;SPAN style="color: #000000;"&gt;Value)=-1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If(&lt;SPAN style="color: #000000;"&gt;Category=30, 150000,0)&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;1000*Value) as NewValue&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Otherwise if you want to use it in a graph directly, just use the following as the expression with Value and Category as dimension:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Isnull(&lt;SPAN style="color: #000000;"&gt;Value)=-1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If(&lt;SPAN style="color: #000000;"&gt;Category=30, 150000,0)&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;1000*Value)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 16:26:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement/m-p/798147#M1033668</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-30T16:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: If statement?!?</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement/m-p/798148#M1033671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I solved it by using&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Value&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;0, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Value&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;*1000),(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Category&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=30, 150000, 0))) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2015 09:41:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement/m-p/798148#M1033671</guid>
      <dc:creator />
      <dc:date>2015-02-02T09:41:39Z</dc:date>
    </item>
  </channel>
</rss>

