<?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 Need help in the expression calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-help-in-the-expression-calculation/m-p/206831#M503059</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all your help,&lt;/P&gt;&lt;P&gt;I want something like this.&lt;/P&gt;&lt;P&gt;if column(1) = 0 and column(2)&amp;gt; 0 then value should be '1'&lt;/P&gt;&lt;P&gt;if column(1) &amp;gt; 0 and column(2)= 0 then value should be '-1'&lt;/P&gt;&lt;P&gt;if column(1) = 0 and column(2)= 0 then value should be '0'&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;PRE style="margin:0px;"&gt;if(column(1)=0,column(2),(column(2)-column(1))/column(1))&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Sep 2010 15:13:05 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-09-17T15:13:05Z</dc:date>
    <item>
      <title>Need help in the expression calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-the-expression-calculation/m-p/206828#M503056</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;I am using the below code in the expression in one of my pivot table to calculate growth but whenever column(1) is 0 it doesn't work as it should be. I know this will not work whenever the column(1) is zero. So let me know what changes has to be done in the expression to make it work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;(column(2)-column(1))/column(1)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Rikab Kothari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Sep 2010 13:54:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-the-expression-calculation/m-p/206828#M503056</guid>
      <dc:creator />
      <dc:date>2010-09-17T13:54:14Z</dc:date>
    </item>
    <item>
      <title>Need help in the expression calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-the-expression-calculation/m-p/206829#M503057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use condition:&lt;BR /&gt;if(column(1)=0, &amp;lt;some fixed value, for example 0&amp;gt;, &amp;lt;your current expression&amp;gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Sep 2010 13:58:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-the-expression-calculation/m-p/206829#M503057</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-09-17T13:58:16Z</dc:date>
    </item>
    <item>
      <title>Need help in the expression calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-the-expression-calculation/m-p/206830#M503058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;if(column(1)=0,column(2),(column(2)-column(1))/column(1))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;If column 1 is 0 then answer will be column 2 as you cant take nothing away then divide it by nothing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Sep 2010 14:51:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-the-expression-calculation/m-p/206830#M503058</guid>
      <dc:creator />
      <dc:date>2010-09-17T14:51:36Z</dc:date>
    </item>
    <item>
      <title>Need help in the expression calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-the-expression-calculation/m-p/206831#M503059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all your help,&lt;/P&gt;&lt;P&gt;I want something like this.&lt;/P&gt;&lt;P&gt;if column(1) = 0 and column(2)&amp;gt; 0 then value should be '1'&lt;/P&gt;&lt;P&gt;if column(1) &amp;gt; 0 and column(2)= 0 then value should be '-1'&lt;/P&gt;&lt;P&gt;if column(1) = 0 and column(2)= 0 then value should be '0'&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;PRE style="margin:0px;"&gt;if(column(1)=0,column(2),(column(2)-column(1))/column(1))&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Sep 2010 15:13:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-the-expression-calculation/m-p/206831#M503059</guid>
      <dc:creator />
      <dc:date>2010-09-17T15:13:05Z</dc:date>
    </item>
    <item>
      <title>Need help in the expression calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-the-expression-calculation/m-p/206832#M503060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you are describing is more like the need for a flag which you could create in script.&lt;/P&gt;&lt;P&gt;A B FLAG&lt;/P&gt;&lt;P&gt;1 0 -1&lt;/P&gt;&lt;P&gt;0 0 0&lt;/P&gt;&lt;P&gt;0 1 1&lt;/P&gt;&lt;P&gt;1 1 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could possibly use nested if statements but it would get a bit complicated and would be better in script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Sep 2010 15:25:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-the-expression-calculation/m-p/206832#M503060</guid>
      <dc:creator />
      <dc:date>2010-09-17T15:25:13Z</dc:date>
    </item>
    <item>
      <title>Need help in the expression calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-the-expression-calculation/m-p/206833#M503061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is contradiction i your requirements:&lt;BR /&gt;In the 1st and 3rd lines: If column1=0, the result should be 1 or 0 depending on column1&lt;BR /&gt;But the last line says that If column1=0, the result should be column2.&lt;BR /&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Sep 2010 17:59:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-the-expression-calculation/m-p/206833#M503061</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-09-17T17:59:26Z</dc:date>
    </item>
    <item>
      <title>Need help in the expression calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-the-expression-calculation/m-p/206834#M503062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Micheal,&lt;/P&gt;&lt;P&gt;That may incorrect! I got little confused!&lt;/P&gt;&lt;P&gt;Here is what i finally want&lt;/P&gt;&lt;P&gt;column(1) column(1) Result&lt;/P&gt;&lt;P&gt;0 &amp;gt;0 '1'&lt;/P&gt;&lt;P&gt;&amp;gt;0 0 '-1'&lt;/P&gt;&lt;P&gt;&amp;gt;0 &amp;gt;0 (column(2)-column(1))/column(1) // I want to use this calculation for this case&lt;/P&gt;&lt;P&gt;0 0 '0'&lt;/P&gt;&lt;P&gt;All these I want to do it expression only. I don't want to do anything in the script as it will be very difficult to maintain in the script for long term.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Sep 2010 07:47:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-the-expression-calculation/m-p/206834#M503062</guid>
      <dc:creator />
      <dc:date>2010-09-18T07:47:22Z</dc:date>
    </item>
    <item>
      <title>Need help in the expression calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-the-expression-calculation/m-p/206835#M503063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Rikab,&lt;/P&gt;&lt;P&gt;There may be smthng wrong you are xpecting..&lt;/P&gt;&lt;P&gt;Just check it out again..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sunil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Sep 2010 09:56:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-the-expression-calculation/m-p/206835#M503063</guid>
      <dc:creator>sunil2288</dc:creator>
      <dc:date>2010-09-18T09:56:54Z</dc:date>
    </item>
    <item>
      <title>Need help in the expression calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-the-expression-calculation/m-p/206836#M503064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rikab, here is the expression, assuming your 2nd column(1) is a mistyping and it should be column(2):&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;if(column(1)=0,&lt;BR /&gt; if(column(2)=0, 0, 1),&lt;BR /&gt; if(column(2)=0, -1, (column(2)-column(1))/column(1)))&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Sep 2010 17:01:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-the-expression-calculation/m-p/206836#M503064</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-09-18T17:01:29Z</dc:date>
    </item>
  </channel>
</rss>

