<?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 variables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-statement-variables/m-p/444893#M165959</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;BR /&gt; I'm having issues with a few variables in my script. I actually get values, but I'm not getting the right numbers. And when I run the debugger, it errors, but doesn't give me any details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is my syntax right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET vBillRate = IF(ProjectType = 1, IF(TransType = 'TS',sum(BillRate), sum(UnitCost)),sum(FP_LineItemRevRecognized/quantity))&lt;/P&gt;&lt;P&gt;SET vRecRevenue&amp;nbsp; = IF(ProjectType = 1, sum(Acrev),sum(FP_LineItemRevRecognized));&lt;/P&gt;&lt;P&gt;SET vCompRevenue= IF(ProjectType = 1,IF(billType = 1,sum(BillRate * quantity),sum(FPRate * quantity)),sum(FPRate * quantity));&lt;/P&gt;&lt;P&gt;SET vRevenueDiff = $(vRecRevenue)-$(vCompRevenue);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Dec 2012 21:01:41 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-12-17T21:01:41Z</dc:date>
    <item>
      <title>If statement variables</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-variables/m-p/444893#M165959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;BR /&gt; I'm having issues with a few variables in my script. I actually get values, but I'm not getting the right numbers. And when I run the debugger, it errors, but doesn't give me any details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is my syntax right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET vBillRate = IF(ProjectType = 1, IF(TransType = 'TS',sum(BillRate), sum(UnitCost)),sum(FP_LineItemRevRecognized/quantity))&lt;/P&gt;&lt;P&gt;SET vRecRevenue&amp;nbsp; = IF(ProjectType = 1, sum(Acrev),sum(FP_LineItemRevRecognized));&lt;/P&gt;&lt;P&gt;SET vCompRevenue= IF(ProjectType = 1,IF(billType = 1,sum(BillRate * quantity),sum(FPRate * quantity)),sum(FPRate * quantity));&lt;/P&gt;&lt;P&gt;SET vRevenueDiff = $(vRecRevenue)-$(vCompRevenue);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2012 21:01:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-variables/m-p/444893#M165959</guid>
      <dc:creator />
      <dc:date>2012-12-17T21:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: If statement variables</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-variables/m-p/444894#M165960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;you cannot use Aggregation functions and field names in to asign to a variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2012 21:59:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-variables/m-p/444894#M165960</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-12-17T21:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: If statement variables</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-variables/m-p/444895#M165961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET instruction its used to set a variable as a rock, if you wanto "ABC" you make SET var = 'ABC';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want a result of an expression for example A*B*C you must to use LET var = A*B*C;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your expression you have missed a ";" before of secont SET&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;SET vBillRate = IF(ProjectType = 1, IF(TransType = 'TS',sum(BillRate), sum(UnitCost)),sum(FP_LineItemRevRecognized/quantity)) &lt;SPAN style="font-size: 14pt; color: #ff0000;"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Luca Jonathan Panetta&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.pljsoftware.com"&gt;PLJ Software&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2012 23:50:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-variables/m-p/444895#M165961</guid>
      <dc:creator>pljsoftware</dc:creator>
      <dc:date>2012-12-17T23:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: If statement variables</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-variables/m-p/444896#M165962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I can’t use aggregation here. How should I handle this scenario? I’m a little confused on how I should handle this. Also, even when I put this expression into a chart, I don't get the correct answer. I have to add 2 different id's for the calculation to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see this thread for more details. &lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/message/292523#292523" title="http://community.qlik.com/message/292523#292523"&gt;http://community.qlik.com/message/292523#292523&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alex Peasley&lt;/P&gt;&lt;P&gt;Business Intelligence Architect&lt;/P&gt;&lt;P&gt;Core BTS&lt;/P&gt;&lt;P&gt;608-661-7769&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 15:39:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-variables/m-p/444896#M165962</guid>
      <dc:creator />
      <dc:date>2012-12-18T15:39:26Z</dc:date>
    </item>
  </channel>
</rss>

