<?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/MAX statement help needed in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/IF-MAX-statement-help-needed/m-p/150657#M28633</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;am trying to get the following IF statement to work, and I'm not sure this is possible and if so, what I'm doing wrong. I have a couple of questions. Do I need a Group By function added to this? If so, where, because I've tried it several ways. Also, can this even be done the way I'm trying to do things?&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;EM&gt;GPAStatusTbl:&lt;/EM&gt;&lt;BR style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" /&gt;SQL SELECT * FROM SYSADM."PS_W_GPA_STS_TBL";&lt;BR style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" /&gt;STORE * FROM GPAStatusTbl INTO &lt;EM&gt;$(vQVDFolder)&lt;/EM&gt;\GPAStatusTbl.qvd;&lt;BR style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" /&gt;DROP TABLE &lt;EM&gt;GPAStatusTbl;&lt;/EM&gt;&lt;BR style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" /&gt;LOAD&lt;BR style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" /&gt;"W_GPA_ID" AS [IHR GPA ID],&lt;BR style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" /&gt;ACTIONDTTM,&lt;BR style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" /&gt;"W_GPA_STATUS",&lt;BR style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" /&gt;IF(W_GPA_STATUS = 'IHV', MAX (ACTIONDTTM)) AS IHR_APP_1_DATE&lt;BR style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" /&gt;FROM &lt;EM&gt;$(vQVDFolder)&lt;/EM&gt;\GPAStatusTbl.qvd (qvd);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Jul 2009 05:03:27 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-07-30T05:03:27Z</dc:date>
    <item>
      <title>IF/MAX statement help needed</title>
      <link>https://community.qlik.com/t5/QlikView/IF-MAX-statement-help-needed/m-p/150657#M28633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;am trying to get the following IF statement to work, and I'm not sure this is possible and if so, what I'm doing wrong. I have a couple of questions. Do I need a Group By function added to this? If so, where, because I've tried it several ways. Also, can this even be done the way I'm trying to do things?&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;EM&gt;GPAStatusTbl:&lt;/EM&gt;&lt;BR style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" /&gt;SQL SELECT * FROM SYSADM."PS_W_GPA_STS_TBL";&lt;BR style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" /&gt;STORE * FROM GPAStatusTbl INTO &lt;EM&gt;$(vQVDFolder)&lt;/EM&gt;\GPAStatusTbl.qvd;&lt;BR style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" /&gt;DROP TABLE &lt;EM&gt;GPAStatusTbl;&lt;/EM&gt;&lt;BR style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" /&gt;LOAD&lt;BR style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" /&gt;"W_GPA_ID" AS [IHR GPA ID],&lt;BR style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" /&gt;ACTIONDTTM,&lt;BR style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" /&gt;"W_GPA_STATUS",&lt;BR style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" /&gt;IF(W_GPA_STATUS = 'IHV', MAX (ACTIONDTTM)) AS IHR_APP_1_DATE&lt;BR style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" /&gt;FROM &lt;EM&gt;$(vQVDFolder)&lt;/EM&gt;\GPAStatusTbl.qvd (qvd);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2009 05:03:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-MAX-statement-help-needed/m-p/150657#M28633</guid>
      <dc:creator />
      <dc:date>2009-07-30T05:03:27Z</dc:date>
    </item>
    <item>
      <title>IF/MAX statement help needed</title>
      <link>https://community.qlik.com/t5/QlikView/IF-MAX-statement-help-needed/m-p/150658#M28634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try: MAX(IF(W_GPA_STATUS = 'IHV', ACTIONDTTM)) AS IHR_APP_1_DATE&lt;/P&gt;&lt;P&gt;And yes, you would need to group it by first 3 fields.&lt;/P&gt;&lt;P&gt;EDIT: And I think you need to use MAXSTRING and not MAX as W_GPA_STATUS seems to be a string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2009 06:48:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-MAX-statement-help-needed/m-p/150658#M28634</guid>
      <dc:creator>disqr_rm</dc:creator>
      <dc:date>2009-07-30T06:48:42Z</dc:date>
    </item>
  </channel>
</rss>

