<?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: Getting invalid Expression when using multiple  IF condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Getting-invalid-Expression-when-using-multiple-IF-condition/m-p/851506#M658840</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your load is an aggregation load which needs an group by statement - have you &lt;SPAN style="font-size: 13.3333330154419px; color: #ff0000;"&gt;DocIsDeleted&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 13.3333330154419px;"&gt; added to them?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 13.3333330154419px;"&gt;- Marcus&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 May 2015 10:52:25 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2015-05-13T10:52:25Z</dc:date>
    <item>
      <title>Getting invalid Expression when using multiple  IF condition</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-invalid-Expression-when-using-multiple-IF-condition/m-p/851505#M658839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;load [ID], if(max(isDraft)=1 and min(isDraft)=0, 2, &lt;SPAN style="color: #000000;"&gt;if( max(isDraft) &amp;lt;2, 1, max(isDraft)&lt;/SPAN&gt;) ) as docMaxPublishedVersion,&lt;/P&gt;&lt;P&gt;if(max(isDraft)=1 and min(isDraft)=0 , 1, 0 ) as oneDraftOnePublish&lt;/P&gt;&lt;P&gt;resident AdminDoc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Modified Code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;load [docID], if(max(isDraft)=1 and min(isDraft)=0, 2,&lt;SPAN style="color: #000000;"&gt; if( max(isDraft) &amp;lt;2,1,if(&lt;SPAN style="color: #ff0000;"&gt;DocIsDeleted&lt;/SPAN&gt; = 1 ,Version,max(isDraft)))&lt;/SPAN&gt; ) as docMaxPublishedVersion,&lt;/P&gt;&lt;P&gt;if(max(isDraft)=1 and min(isDraft)=0 , 1, 0 ) as oneDraftOnePublish&lt;/P&gt;&lt;P&gt;resident AdminDoc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have added one more condition to the &lt;STRONG style="font-size: 13.3333330154419px;"&gt;Original Code&lt;/STRONG&gt;( i.e &lt;SPAN style="font-size: 13.3333330154419px; color: #ff0000;"&gt;DocIsDeleted&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 13.3333330154419px;"&gt; &lt;/SPAN&gt;), adding this if condition in &lt;STRONG style="font-size: 13.3333330154419px;"&gt;Modified Code&lt;/STRONG&gt;, results in &lt;STRONG&gt;INVALID EXPRESSION&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also tried ISNULL , got same error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please advice.&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>Wed, 13 May 2015 10:47:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-invalid-Expression-when-using-multiple-IF-condition/m-p/851505#M658839</guid>
      <dc:creator />
      <dc:date>2015-05-13T10:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: Getting invalid Expression when using multiple  IF condition</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-invalid-Expression-when-using-multiple-IF-condition/m-p/851506#M658840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your load is an aggregation load which needs an group by statement - have you &lt;SPAN style="font-size: 13.3333330154419px; color: #ff0000;"&gt;DocIsDeleted&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 13.3333330154419px;"&gt; added to them?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 13.3333330154419px;"&gt;- Marcus&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 10:52:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-invalid-Expression-when-using-multiple-IF-condition/m-p/851506#M658840</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-05-13T10:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: Getting invalid Expression when using multiple  IF condition</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-invalid-Expression-when-using-multiple-IF-condition/m-p/851507#M658841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;could you post your application..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 10:54:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-invalid-Expression-when-using-multiple-IF-condition/m-p/851507#M658841</guid>
      <dc:creator>manojkulkarni</dc:creator>
      <dc:date>2015-05-13T10:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Getting invalid Expression when using multiple  IF condition</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-invalid-Expression-when-using-multiple-IF-condition/m-p/851508#M658842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does the LOAD have a Group By clause? Check that all of the non-aggregated fields (eg docID) are in the group by, and none of the aggregated fields are.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i suspect that DocIsdeleted is not in the GROUP BY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 10:54:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-invalid-Expression-when-using-multiple-IF-condition/m-p/851508#M658842</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-05-13T10:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Getting invalid Expression when using multiple  IF condition</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-invalid-Expression-when-using-multiple-IF-condition/m-p/851509#M658843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;thanks,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;load [docID], if(max(isDraft)=1 and min(isDraft)=0, 2,&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"&gt; if( max(isDraft) &amp;lt;2,1,if(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;DocIsDeleted&lt;/SPAN&gt; = 1 ,Version,max(isDraft)))&lt;/SPAN&gt; ) as docMaxPublishedVersion,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(max(isDraft)=1 and min(isDraft)=0 , 1, 0 ) as oneDraftOnePublish&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;resident AdminDoc&lt;/P&gt;&lt;P&gt;group by [docID].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is what the code is, so i need to add the &lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #ff0000;"&gt;DocIsDeleted&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp; to the group by so it looks like &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;group by [docID],&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #ff0000;"&gt;DocIsDeleted&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&lt;STRONG&gt;&amp;nbsp; ?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tried the above did not work.&lt;/P&gt;&lt;P&gt;correct me ,if am wrong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 11:03:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-invalid-Expression-when-using-multiple-IF-condition/m-p/851509#M658843</guid>
      <dc:creator />
      <dc:date>2015-05-13T11:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: Getting invalid Expression when using multiple  IF condition</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-invalid-Expression-when-using-multiple-IF-condition/m-p/851510#M658844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;thanks,&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;i suspect that DocIsdeleted is not in the GROUP BY.?&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;you are right, but after adding also i see the same error&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 11:05:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-invalid-Expression-when-using-multiple-IF-condition/m-p/851510#M658844</guid>
      <dc:creator />
      <dc:date>2015-05-13T11:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: Getting invalid Expression when using multiple  IF condition</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-invalid-Expression-when-using-multiple-IF-condition/m-p/851511#M658845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it worked ,as i added another field &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Version&lt;/STRONG&gt; into the Group By.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i would also like to know what is &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;aggregation load. &lt;/STRONG&gt; please explain.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 11:16:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-invalid-Expression-when-using-multiple-IF-condition/m-p/851511#M658845</guid>
      <dc:creator />
      <dc:date>2015-05-13T11:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: Getting invalid Expression when using multiple  IF condition</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-invalid-Expression-when-using-multiple-IF-condition/m-p/851512#M658846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Each time if you used expressions like max/min/avg/sum/concat you made an aggregation load which will be grouped on these fields which are not included in the above mentioned expressions and which will be need to call explicit in these group by statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 12:39:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-invalid-Expression-when-using-multiple-IF-condition/m-p/851512#M658846</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-05-13T12:39:01Z</dc:date>
    </item>
  </channel>
</rss>

