<?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 Expression is not working as per expectation. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-is-not-working-as-per-expectation/m-p/71866#M11826</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have one expression in which i am trying to find percentage as per below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;((Sum({&amp;lt; REC_TYPE={InvoiceDateRec}&amp;gt;}if(ARCOST_TOTAL_COST&amp;gt;=0 or ARCOST_TOTAL_COST&amp;lt;=0,(RAGLDA_ACCTD_AMOUNT*XRATE_CONST*RATE)))&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;&amp;nbsp; REC_TYPE={InvoiceDateRec}&amp;gt;} if(ARCOST_TOTAL_COST&amp;gt;=0 or ARCOST_TOTAL_COST&amp;lt;=0,(ARCOST_TOTAL_COST*XRATE_CONST*RATE))))&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;(Sum({&amp;lt; REC_TYPE={InvoiceDateRec}&amp;gt;} (RAGLDA_ACCTD_AMOUNT*XRATE_CONST*RATE))))&lt;/P&gt;&lt;P&gt;*100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically it is ((sales - cost) / sales)*100 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here when i put whole above expression it is showing wrong result. but when i create seperate column for (sales-cost). and one more column for (sales) and calculating final percentage column using "column()"&amp;nbsp;&amp;nbsp; like column(1)/column(2)&amp;nbsp; it is showing correct result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/192784_1.png" style="height: 197px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Feb 2018 09:45:27 GMT</pubDate>
    <dc:creator>parthesh</dc:creator>
    <dc:date>2018-02-08T09:45:27Z</dc:date>
    <item>
      <title>Expression is not working as per expectation.</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-is-not-working-as-per-expectation/m-p/71866#M11826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have one expression in which i am trying to find percentage as per below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;((Sum({&amp;lt; REC_TYPE={InvoiceDateRec}&amp;gt;}if(ARCOST_TOTAL_COST&amp;gt;=0 or ARCOST_TOTAL_COST&amp;lt;=0,(RAGLDA_ACCTD_AMOUNT*XRATE_CONST*RATE)))&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;&amp;nbsp; REC_TYPE={InvoiceDateRec}&amp;gt;} if(ARCOST_TOTAL_COST&amp;gt;=0 or ARCOST_TOTAL_COST&amp;lt;=0,(ARCOST_TOTAL_COST*XRATE_CONST*RATE))))&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;(Sum({&amp;lt; REC_TYPE={InvoiceDateRec}&amp;gt;} (RAGLDA_ACCTD_AMOUNT*XRATE_CONST*RATE))))&lt;/P&gt;&lt;P&gt;*100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically it is ((sales - cost) / sales)*100 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here when i put whole above expression it is showing wrong result. but when i create seperate column for (sales-cost). and one more column for (sales) and calculating final percentage column using "column()"&amp;nbsp;&amp;nbsp; like column(1)/column(2)&amp;nbsp; it is showing correct result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/192784_1.png" style="height: 197px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 09:45:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-is-not-working-as-per-expectation/m-p/71866#M11826</guid>
      <dc:creator>parthesh</dc:creator>
      <dc:date>2018-02-08T09:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: Expression is not working as per expectation.</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-is-not-working-as-per-expectation/m-p/71867#M11827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe this made a difference:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(&lt;STRONG&gt;rangesum&lt;/STRONG&gt;(sales, -cost) / sales)*100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 12:12:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-is-not-working-as-per-expectation/m-p/71867#M11827</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-02-08T12:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Expression is not working as per expectation.</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-is-not-working-as-per-expectation/m-p/71868#M11828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why do you need the if statement here? If &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;ARCOST_TOTAL_COST is a number, then it will either be greater than equal 0 or less than equal to 0... are you checking if it is text???&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Also, it should not matter, but Sales in the numerator have a different expression than sales in the denominator??&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 12:45:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-is-not-working-as-per-expectation/m-p/71868#M11828</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-02-08T12:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Expression is not working as per expectation.</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-is-not-working-as-per-expectation/m-p/71869#M11829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to avoid null we are doing that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 14:28:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-is-not-working-as-per-expectation/m-p/71869#M11829</guid>
      <dc:creator>parthesh</dc:creator>
      <dc:date>2018-02-08T14:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Expression is not working as per expectation.</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-is-not-working-as-per-expectation/m-p/71870#M11830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nulls can be avoided like this in set analysis&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;ARCOST_TOTAL_COST = {"*"}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 14:29:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-is-not-working-as-per-expectation/m-p/71870#M11830</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-02-08T14:29:33Z</dc:date>
    </item>
  </channel>
</rss>

