<?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: Use of only function with 'Max' in set expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Use-of-only-function-with-Max-in-set-expression/m-p/740743#M264568</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;Why there is no status for 55, 56 and 57?&amp;nbsp; if there are values for that then use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue(Status, -EventID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Jan 2015 09:20:43 GMT</pubDate>
    <dc:creator>jagan</dc:creator>
    <dc:date>2015-01-06T09:20:43Z</dc:date>
    <item>
      <title>Use of only function with 'Max' in set expression</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-only-function-with-Max-in-set-expression/m-p/740742#M264567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="padding-left: 30px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I have the following data tables:&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;EventID, Status, Value&lt;/P&gt;&lt;P&gt;52, A, 10&lt;/P&gt;&lt;P&gt;53, E, 20&lt;/P&gt;&lt;P&gt;54, A, 30&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;ID, EventID&lt;/P&gt;&lt;P&gt;37, 52&lt;/P&gt;&lt;P&gt;37, 53&lt;/P&gt;&lt;P&gt;41, 54&lt;/P&gt;&lt;P&gt;41, 55&lt;/P&gt;&lt;P&gt;41, 56&lt;/P&gt;&lt;P&gt;41, 57&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Requirement:&lt;/P&gt;&lt;P&gt;In straight table I have to display two columns 'ID' and 'Status'. There should be single row for each ID; meaning here, there should be distinct ID's in straight table. If there are multiple values for same ID, then it's 'Status' value in our straight table column should be of max of 'EventID'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Expression in straight table is : &lt;/P&gt;&lt;P&gt;if(count(DISTINCT [Status])&amp;gt;1,Only({&amp;lt;[EventID]={$(=max([EventID]))}&amp;gt;}[Status]),[Status])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;For example:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;The output I'm expecting in Straight table is :&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Status&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;37&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; E&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;41&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;But its giving below output:&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Status&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;37&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;41&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;'E' is expected in status column instead of null i.e.' - '.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;I'm not getting the correct output. I used 'Aggr' function with max, but did'nt work. Also to mention, use of maxstring function is not expected here. &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;I want help for this issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Can you suggest expression similar to this.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 09:06:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-only-function-with-Max-in-set-expression/m-p/740742#M264567</guid>
      <dc:creator />
      <dc:date>2015-01-06T09:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: Use of only function with 'Max' in set expression</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-only-function-with-Max-in-set-expression/m-p/740743#M264568</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;Why there is no status for 55, 56 and 57?&amp;nbsp; if there are values for that then use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue(Status, -EventID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 09:20:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-only-function-with-Max-in-set-expression/m-p/740743#M264568</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-01-06T09:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Use of only function with 'Max' in set expression</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-only-function-with-Max-in-set-expression/m-p/740744#M264569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And if you have to take nulls into consideration and avoid it, try like:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FirstSortedValue({&amp;lt;Status={'*'}&amp;gt;}Status,-EventID)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PFA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 09:30:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-only-function-with-Max-in-set-expression/m-p/740744#M264569</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-01-06T09:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Use of only function with 'Max' in set expression</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-only-function-with-Max-in-set-expression/m-p/740745#M264570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression suggested by you is not working for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ID '37', its still displaying '-' instead of 'E' value in 'Status' column. !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 10:23:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-only-function-with-Max-in-set-expression/m-p/740745#M264570</guid>
      <dc:creator />
      <dc:date>2015-01-06T10:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: Use of only function with 'Max' in set expression</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-only-function-with-Max-in-set-expression/m-p/740746#M264571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A &lt;STRONG&gt;distinct &lt;/STRONG&gt;would be required. Try like:&lt;/P&gt;&lt;P&gt;=FirstSortedValue({&amp;lt;[Patient Status]={'*'}&amp;gt;} &lt;STRONG&gt;Distinct&lt;/STRONG&gt; [Patient Status], -[SS_Event_EP_ID])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 10:35:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-only-function-with-Max-in-set-expression/m-p/740746#M264571</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-01-06T10:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Use of only function with 'Max' in set expression</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-only-function-with-Max-in-set-expression/m-p/740747#M264572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, It worked.&lt;/P&gt;&lt;P&gt;I appreciate your help!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 11:00:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-only-function-with-Max-in-set-expression/m-p/740747#M264572</guid>
      <dc:creator />
      <dc:date>2015-01-06T11:00:51Z</dc:date>
    </item>
  </channel>
</rss>

