<?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: How to use if-statement in Qlikview? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-use-if-statement-in-Qlikview/m-p/462960#M485260</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;Thanks! the "Alt" function was excatly what I needed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Janne&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Apr 2013 08:35:27 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-04-18T08:35:27Z</dc:date>
    <item>
      <title>How to use if-statement in Qlikview?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-if-statement-in-Qlikview/m-p/462956#M485256</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 am using in excel very often formula if(iserror(.... How could I use that in Qlikview?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem that sometimes I don't get any result with my formula because some part is missing and in these cases I would like to use another formula. How can I write that script? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have following script &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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: #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;demand&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;*price&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&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;demand&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;*(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Beginning Inventory]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Beginning Inventory kg]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)),&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;demand&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;*price&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;0 is wrong in this formula. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;If &lt;EM&gt;price&lt;/EM&gt; doesn't exist I will not get any result. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;In excel I would write this as following&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;If(iserror(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;demand&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;*price&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;(&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Beginning Inventory]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Beginning Inventory kg]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)*demand,&lt;/SPAN&gt;(&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;demand&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;*price&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;How can I do same thing in QlikView??&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Janne&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2013 11:23:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-if-statement-in-Qlikview/m-p/462956#M485256</guid>
      <dc:creator />
      <dc:date>2013-04-17T11:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to use if-statement in Qlikview?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-if-statement-in-Qlikview/m-p/462957#M485257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use the below mentioned script :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="font-size: 8pt; color: #0000ff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;isnull(price)&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: #0000ff;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: #800000;"&gt;demand&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;*(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: #800000;"&gt;[Beginning Inventory]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: #800000;"&gt;[Beginning Inventory kg]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: #0000ff;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: #800000;"&gt;demand&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;*price&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;you can use the isnull() function to find out that the "Price" exist or not. and accordingly calculate the results.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;-Nilesh&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2013 13:09:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-if-statement-in-Qlikview/m-p/462957#M485257</guid>
      <dc:creator>nilesh_gangurde</dc:creator>
      <dc:date>2013-04-17T13:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to use if-statement in Qlikview?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-if-statement-in-Qlikview/m-p/462958#M485258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't think of a reason that demand*price would produce and error, except that demand might be null.&lt;/P&gt;&lt;P&gt;Try: if(isnull(demand), .....&lt;/P&gt;&lt;P&gt;or maybe&lt;/P&gt;&lt;P&gt;if(len(demand)=0, ....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2013 13:43:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-if-statement-in-Qlikview/m-p/462958#M485258</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2013-04-17T13:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to use if-statement in Qlikview?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-if-statement-in-Qlikview/m-p/462959#M485259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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: #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;demand&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;* Alt(price, 0)&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&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;demand&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;*(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Beginning Inventory]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Beginning Inventory kg]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)),&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;demand&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;*price&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;If Price is null, Alt() will return 0.&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Hope this helps you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2013 14:31:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-if-statement-in-Qlikview/m-p/462959#M485259</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2013-04-17T14:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to use if-statement in Qlikview?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-if-statement-in-Qlikview/m-p/462960#M485260</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;Thanks! the "Alt" function was excatly what I needed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Janne&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 08:35:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-if-statement-in-Qlikview/m-p/462960#M485260</guid>
      <dc:creator />
      <dc:date>2013-04-18T08:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to use if-statement in Qlikview?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-if-statement-in-Qlikview/m-p/462961#M485261</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;Once again thanks for your great advice. However I have now another problem. QlikView doesn't sum this formula properly in my pivot chart. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have now following formula monster there&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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: #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;demand&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;alt&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;price&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,0))=0,&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: #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;demand&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;alt&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;average&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,0))=0,&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: #0000ff; font-size: 8pt;"&gt;alt&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;demand&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,0)=&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;0,0,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;demand&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),(&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;demand&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)*&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;average&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)),&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;demand&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;*&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;price&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;This formula returns values in every case, but in total row the sum is wrong. If I take all values in to excel I can see that total is something else than Qlikview is telling me. How should I modify my formula that the total sum would be calculated in a right way?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Janne&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Apr 2013 08:55:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-if-statement-in-Qlikview/m-p/462961#M485261</guid>
      <dc:creator />
      <dc:date>2013-04-24T08:55:27Z</dc:date>
    </item>
  </channel>
</rss>

