<?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 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/IF-Statement-in-Qlikview/m-p/422156#M1153339</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, Im not trying in a load statement, as i am using my dimensions which i calculate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the info though, i will try it like that later.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the help y'all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Apr 2013 14:36:35 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-04-04T14:36:35Z</dc:date>
    <item>
      <title>IF Statement in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement-in-Qlikview/m-p/422149#M1153328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey There,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an issue with my IF statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is a dual if, where im asking it to verfy the period, and then do a calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I run each of the IF statements on their own, I get results, but when combining them, I get a - result &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can you assist with the syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Period &amp;lt; 201302,&lt;/P&gt;&lt;P&gt;if(ABC='ABC1' and [Flag]='X' [No of Boxes] * 15,&lt;/P&gt;&lt;P&gt;if(Period&amp;gt;= 201302, &lt;/P&gt;&lt;P&gt;if(ABC='ABC1' and [Flag]='X' [No of Boxes] * 20))),0)*1.14&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2013 09:31:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement-in-Qlikview/m-p/422149#M1153328</guid>
      <dc:creator />
      <dc:date>2013-04-04T09:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement-in-Qlikview/m-p/422150#M1153329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please try the below statement :&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;if(Period &amp;lt; 201302,&lt;/P&gt;&lt;P&gt;if(ABC='ABC1' and [Flag]='X',[No of Boxes] * 15,&lt;/P&gt;&lt;P&gt;if(Period&amp;gt;= 201302,&lt;/P&gt;&lt;P&gt;if(ABC='ABC1' and [Flag]='X',[No of Boxes] * 20)))*1.14 ,0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will return 0, if no condition is matched.&lt;/P&gt;&lt;P&gt;Please let me know if this was helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;angad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2013 10:17:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement-in-Qlikview/m-p/422150#M1153329</guid>
      <dc:creator />
      <dc:date>2013-04-04T10:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement-in-Qlikview/m-p/422151#M1153330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Juliette,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe it's just a typo in your post, but I think you are missing commata before [No of boxes] to start your THEN branch in your if-statements:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Period &amp;lt; 201302,&lt;/P&gt;&lt;P&gt;if(ABC='ABC1' and [Flag]='X', [No of Boxes] * 15,&lt;/P&gt;&lt;P&gt;if(Period&amp;gt;= 201302, &lt;/P&gt;&lt;P&gt;if(ABC='ABC1' and [Flag]='X', [No of Boxes] * 20))),0)*1.14&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, you are not defining an ELSE branch for every possible combination of values, so this might lead to a '-' result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, you are not using an aggregation function, so your expression will only work if you get unambiguous values for ABC, Flag, No of Boxes, Period in the context you are evaluating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2013 10:20:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement-in-Qlikview/m-p/422151#M1153330</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-04-04T10:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement-in-Qlikview/m-p/422152#M1153331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stephan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was actually putting in an example of the IF statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the actual IF statement which is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried everyones examples, and i cannot get it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Period &amp;lt; 201302,&lt;/P&gt;&lt;P&gt;if(NCS='NCSNP' and [Waiver Flag]='DSP' and [AcuteChronic Flag] = 'CHRONIC RX',[No of Rx] * 12,&lt;/P&gt;&lt;P&gt;if(NCS='NCSNP' and [Waiver Flag]='DSP' and [AcuteChronic Flag] = 'ACUTE RX',[No of Rx]*5,&lt;/P&gt;&lt;P&gt;if(NCS='NCS PHY 500' and [Waiver Flag]='DSP' and [AcuteChronic Flag] = 'CHRONIC RX',[No of Rx] * 12,&lt;/P&gt;&lt;P&gt;if(NCS='NCS PHY 500' and [Waiver Flag]='DSP' and [AcuteChronic Flag] = 'ACUTE RX',[No of Rx]*5,&lt;/P&gt;&lt;P&gt;if(NCS='NCS PHY 300' and [Waiver Flag]='DSP' and [AcuteChronic Flag] = 'CHRONIC RX',[No of Rx] * 12,&lt;/P&gt;&lt;P&gt;if(NCS='NCS PHY 300' and [Waiver Flag]='DSP' and [AcuteChronic Flag] = 'ACUTE RX',[No of Rx]*5,&lt;/P&gt;&lt;P&gt;if(Period&amp;gt;= 201302,&lt;/P&gt;&lt;P&gt;if(NCS='NCSNP' and [Waiver Flag]='DSP' and [AcuteChronic Flag] = 'CHRONIC RX',[No of Rx] * 20,&lt;/P&gt;&lt;P&gt;if(NCS='NCSNP' and [Waiver Flag]='DSP' and [AcuteChronic Flag] = 'ACUTE RX',[No of Rx]*5,&lt;/P&gt;&lt;P&gt;if(NCS='NCS PHY 500' and [Waiver Flag]='DSP' and [AcuteChronic Flag] = 'CHRONIC RX',[No of Rx] * 20,&lt;/P&gt;&lt;P&gt;if(NCS='NCS PHY 500' and [Waiver Flag]='DSP' and [AcuteChronic Flag] = 'ACUTE RX',[No of Rx]*5,&lt;/P&gt;&lt;P&gt;if(NCS='NCS PHY 300' and [Waiver Flag]='DSP' and [AcuteChronic Flag] = 'CHRONIC RX',[No of Rx] * 20,&lt;/P&gt;&lt;P&gt;if(NCS='NCS PHY 300' and [Waiver Flag]='DSP' and [AcuteChronic Flag] = 'ACUTE RX',[No of Rx]*5)))))))))))))*1.14,0)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2013 11:56:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement-in-Qlikview/m-p/422152#M1153331</guid>
      <dc:creator />
      <dc:date>2013-04-04T11:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement-in-Qlikview/m-p/422153#M1153333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are u trying this in a load statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u r doing in load statement, U should get the result, and performance will increase.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2013 13:26:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement-in-Qlikview/m-p/422153#M1153333</guid>
      <dc:creator />
      <dc:date>2013-04-04T13:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement-in-Qlikview/m-p/422154#M1153335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Juliette, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you try the below query please :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Period &amp;lt; 201302,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if((NCS='NCSNP'or NCS = 'NCS PHY 500' or NCS='NCS PHY 300') and [Waiver Flag]='DSP' and [AcuteChronic Flag] = 'CHRONIC RX' ,[No of Rx] * 12,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if((NCS='NCSNP' or NCS='NCS PHY 500' or NCS='NCS PHY 300') and [Waiver Flag]='DSP' and [AcuteChronic Flag] = 'ACUTE RX',[No of Rx]*5,&lt;/P&gt;&lt;P&gt;if(Period&amp;gt;= 201302,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if((NCS='NCSNP' or NCS='NCS PHY 500' or NCS='NCS PHY 300') and [Waiver Flag]='DSP' and [AcuteChronic Flag] = 'CHRONIC RX',[No of Rx] * 20,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if((NCS='NCSNP' or NCS='NCS PHY 500' or NCS='NCS PHY 300) and [Waiver Flag]='DSP' and [AcuteChronic Flag] = 'ACUTE RX',[No of Rx]*5)))))*1.14,0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if this was helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Angad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2013 13:53:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement-in-Qlikview/m-p/422154#M1153335</guid>
      <dc:creator />
      <dc:date>2013-04-04T13:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement-in-Qlikview/m-p/422155#M1153337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you Angad!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Woohoo&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2013 14:35:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement-in-Qlikview/m-p/422155#M1153337</guid>
      <dc:creator />
      <dc:date>2013-04-04T14:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement-in-Qlikview/m-p/422156#M1153339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, Im not trying in a load statement, as i am using my dimensions which i calculate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the info though, i will try it like that later.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the help y'all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2013 14:36:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement-in-Qlikview/m-p/422156#M1153339</guid>
      <dc:creator />
      <dc:date>2013-04-04T14:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement-in-Qlikview/m-p/422157#M1153341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Juliette,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please mark your question as answered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Angad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2013 05:16:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement-in-Qlikview/m-p/422157#M1153341</guid>
      <dc:creator />
      <dc:date>2013-04-05T05:16:59Z</dc:date>
    </item>
  </channel>
</rss>

