<?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: Max Count displaying field name in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Max-Count-displaying-field-name/m-p/640905#M234800</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&lt;BR data-jive-statusinputadd="true" data-jive-truncation-flag="true" /&gt;I saw this response using the FirstSortedValue and I was hoping that was close to a solution to the problem I am having.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an app in which I need to display the count of the current workflow status for distinct REQUEST_ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To determine current workflow status, I am looking at max(WORKFLOW_STEP_ELIG_DATE) and then want a count of the associated WORKFLOW_STEP_NAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I started with:&lt;BR data-jive-statusinputadd="true" data-jive-truncation-flag="true" /&gt;=count(aggr(max(WORKFLOW_STEP_ELIG_DATE), REQUEST_ID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then tried applying the FirstSortedValue expression but it didn't work because I can't use nested aggregation to get the MAX ELIG_DATE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue([WORKFLOW_STEP_NAME], (-Aggr(Count( DISTINCT WORKFLOW_STEP_ELIG_DATE), REQUEST_ID)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any guidance would be greatly appreciated. Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cassandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Jan 2015 22:29:05 GMT</pubDate>
    <dc:creator>cbaqir</dc:creator>
    <dc:date>2015-01-05T22:29:05Z</dc:date>
    <item>
      <title>Max Count displaying field name</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Count-displaying-field-name/m-p/640898#M234793</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;I would like to do a max count but instead of displaying the count I would like to display the field name of the highest count&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max( aggr( count([Reason Code ]), [Reason Code ]))&amp;nbsp; This gives me the count of the highest reason code, but I need to display the name of the highest reason code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 13:38:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Count-displaying-field-name/m-p/640898#M234793</guid>
      <dc:creator>rido1421</dc:creator>
      <dc:date>2014-06-05T13:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Max Count displaying field name</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Count-displaying-field-name/m-p/640899#M234794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rido&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue([Reason Code ],&lt;/P&gt;&lt;P&gt;( -aggr( count([Reason Code ]), [Reason Code ]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 13:40:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Count-displaying-field-name/m-p/640899#M234794</guid>
      <dc:creator />
      <dc:date>2014-06-05T13:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Max Count displaying field name</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Count-displaying-field-name/m-p/640900#M234795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Update &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try with this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is used to find Max number&lt;/P&gt;&lt;P&gt;=Max( Aggr( count ( [Reason Code] ), [Reason Code] ))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i believe you have to use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue([Reason Code],-(aggr( count([Reason Code]), [Reason Code])) )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 13:42:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Count-displaying-field-name/m-p/640900#M234795</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-06-05T13:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Max Count displaying field name</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Count-displaying-field-name/m-p/640901#M234796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi it doesn’t seem to be working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you mean with the below?&lt;/P&gt;&lt;P&gt;,[Your Reason Name Here]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ridhaa Hendricks&lt;/P&gt;&lt;P&gt;Data Analyst&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0842276595&lt;/P&gt;&lt;P&gt;r.hendricks@cellc.co.za&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;This email and its contents are subject to our email legal notice which can be viewed at http://www.cellc.co.za/dl/cms/downloads/Email_legal_notice.pdf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 13:49:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Count-displaying-field-name/m-p/640901#M234796</guid>
      <dc:creator>rido1421</dc:creator>
      <dc:date>2014-06-05T13:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: Max Count displaying field name</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Count-displaying-field-name/m-p/640902#M234797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FirstSortedValue([Region Name], -Aggr(COUNT([Region Code]), [Region Code])&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;FirstSortedValue([Region Name], -COUNT([Region Code]))&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;FirstSortedValue([Region Name], -Aggr(COUNT([Region Code]), [Region Name])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 20:13:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Count-displaying-field-name/m-p/640902#M234797</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-06-05T20:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Max Count displaying field name</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Count-displaying-field-name/m-p/640903#M234798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You Christianj! This worked perfect! ☺&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ridhaa Hendricks&lt;/P&gt;&lt;P&gt;Data Analyst&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0842276595&lt;/P&gt;&lt;P&gt;r.hendricks@cellc.co.za&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;This email and its contents are subject to our email legal notice which can be viewed at http://www.cellc.co.za/dl/cms/downloads/Email_legal_notice.pdf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jun 2014 04:53:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Count-displaying-field-name/m-p/640903#M234798</guid>
      <dc:creator>rido1421</dc:creator>
      <dc:date>2014-06-06T04:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Max Count displaying field name</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Count-displaying-field-name/m-p/640904#M234799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rido,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;glad to help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to close the case tick it as correct&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jun 2014 07:28:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Count-displaying-field-name/m-p/640904#M234799</guid>
      <dc:creator />
      <dc:date>2014-06-06T07:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Max Count displaying field name</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Count-displaying-field-name/m-p/640905#M234800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&lt;BR data-jive-statusinputadd="true" data-jive-truncation-flag="true" /&gt;I saw this response using the FirstSortedValue and I was hoping that was close to a solution to the problem I am having.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an app in which I need to display the count of the current workflow status for distinct REQUEST_ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To determine current workflow status, I am looking at max(WORKFLOW_STEP_ELIG_DATE) and then want a count of the associated WORKFLOW_STEP_NAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I started with:&lt;BR data-jive-statusinputadd="true" data-jive-truncation-flag="true" /&gt;=count(aggr(max(WORKFLOW_STEP_ELIG_DATE), REQUEST_ID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then tried applying the FirstSortedValue expression but it didn't work because I can't use nested aggregation to get the MAX ELIG_DATE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue([WORKFLOW_STEP_NAME], (-Aggr(Count( DISTINCT WORKFLOW_STEP_ELIG_DATE), REQUEST_ID)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any guidance would be greatly appreciated. Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cassandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2015 22:29:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Count-displaying-field-name/m-p/640905#M234800</guid>
      <dc:creator>cbaqir</dc:creator>
      <dc:date>2015-01-05T22:29:05Z</dc:date>
    </item>
  </channel>
</rss>

