<?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 error in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/IF-Statement-error/m-p/385044#M143813</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can replace the year and month with monthname() This is a combination of the month and year &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Monthname(X) = Monthname(Z) and Day(X)&amp;lt;&amp;gt;Day(Z)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Sep 2012 20:39:54 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-09-06T20:39:54Z</dc:date>
    <item>
      <title>IF Statement error</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement-error/m-p/385040#M143809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi anybody can help me figuring out what's wrong in this IF statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if (ExpenseFrequency ='Monthly' &amp;amp; (Year([Payment Date]) = Year(ExpenseStartDate)) &amp;amp;(month(ExpenseStartDate) = month([Payment Date]))&amp;amp; (Day(ExpenseStartDate)&amp;lt;&amp;gt;Day([Payment Date])),&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (([Expense Amount in USD]/Day(MonthEnd([Payment Date])))*(Day(MonthEnd([Payment Date]))-Day(ExpenseStartDate)+1)) ,[Expense Amount in USD])&amp;nbsp; as [Expense Amount (USD)] ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like on one of the records I have:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ExpenseFrequency= Monthly&lt;/P&gt;&lt;P&gt;PaymentDate 2008-10-01&lt;/P&gt;&lt;P&gt;ExpenseStartDate=2008-10-15&lt;/P&gt;&lt;P&gt;[Expense Amount in USD]= 4504.17 (this amount after the calculations in the if satement above should be 2470.03 ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 14:57:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement-error/m-p/385040#M143809</guid>
      <dc:creator>alec1982</dc:creator>
      <dc:date>2012-09-06T14:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement error</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement-error/m-p/385041#M143810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;replace&amp;nbsp; &amp;amp; with and. &amp;amp; is used to concate strings&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 15:00:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement-error/m-p/385041#M143810</guid>
      <dc:creator />
      <dc:date>2012-09-06T15:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement error</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement-error/m-p/385042#M143811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if(&lt;/P&gt;&lt;P&gt;ExpenseFrequency ='Monthly' &amp;amp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should be &lt;/P&gt;&lt;P&gt;if(&lt;/P&gt;&lt;P&gt;ExpenseFrequency ='Monthly' and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also for other cases...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use &amp;amp; for concattenating 2 fields (like load fieldA&amp;amp;'someText'&amp;amp;fieldB)&lt;/P&gt;&lt;P&gt;Use and for combining conditions (like if(1=1 and 2=2 and 3=3,'valueIfTrue','valueIfFalse')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 15:03:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement-error/m-p/385042#M143811</guid>
      <dc:creator />
      <dc:date>2012-09-06T15:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement error</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement-error/m-p/385043#M143812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This working perfectly, &lt;/P&gt;&lt;P&gt;do you guys have anyway of simplifying the statement above.&lt;/P&gt;&lt;P&gt;Like if you notice i am checking if Year(X) = Year(Z) and month(X)=Month(Z) and Day(X)&amp;lt;&amp;gt;Day(Z)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let me know and thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 15:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement-error/m-p/385043#M143812</guid>
      <dc:creator>alec1982</dc:creator>
      <dc:date>2012-09-06T15:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement error</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement-error/m-p/385044#M143813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can replace the year and month with monthname() This is a combination of the month and year &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Monthname(X) = Monthname(Z) and Day(X)&amp;lt;&amp;gt;Day(Z)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 20:39:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement-error/m-p/385044#M143813</guid>
      <dc:creator />
      <dc:date>2012-09-06T20:39:54Z</dc:date>
    </item>
  </channel>
</rss>

