<?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 [FirstsortedValue] Multiple row, same date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/FirstsortedValue-Multiple-row-same-date/m-p/580352#M545580</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'm currently working on a graph that will show the score of customer. It's just a field, link with some date. The users want to see the last value available, so i'm using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue(CUST_SCORE, -Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works but the problem is, sometimes, there is multiple row with the same date (and same score) so it shows "-".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried ONLY() but the expression didn't work at all... Do you have an idea ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Mar 2014 10:31:26 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-03-31T10:31:26Z</dc:date>
    <item>
      <title>[FirstsortedValue] Multiple row, same date</title>
      <link>https://community.qlik.com/t5/QlikView/FirstsortedValue-Multiple-row-same-date/m-p/580352#M545580</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'm currently working on a graph that will show the score of customer. It's just a field, link with some date. The users want to see the last value available, so i'm using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue(CUST_SCORE, -Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works but the problem is, sometimes, there is multiple row with the same date (and same score) so it shows "-".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried ONLY() but the expression didn't work at all... Do you have an idea ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 10:31:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstsortedValue-Multiple-row-same-date/m-p/580352#M545580</guid>
      <dc:creator />
      <dc:date>2014-03-31T10:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: [FirstsortedValue] Multiple row, same date</title>
      <link>https://community.qlik.com/t5/QlikView/FirstsortedValue-Multiple-row-same-date/m-p/580353#M545581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maxstring(Field name)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 10:34:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstsortedValue-Multiple-row-same-date/m-p/580353#M545581</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-03-31T10:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: [FirstsortedValue] Multiple row, same date</title>
      <link>https://community.qlik.com/t5/QlikView/FirstsortedValue-Multiple-row-same-date/m-p/580354#M545582</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;use FirstSortedValue(distinct CUST_SCORE, -Date), this will gives you syntax wrong, but it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 10:37:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstsortedValue-Multiple-row-same-date/m-p/580354#M545582</guid>
      <dc:creator>stabben23</dc:creator>
      <dc:date>2014-03-31T10:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: [FirstsortedValue] Multiple row, same date</title>
      <link>https://community.qlik.com/t5/QlikView/FirstsortedValue-Multiple-row-same-date/m-p/580355#M545583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue( Aggr(Concat(distinct CUST_SCORE, ',') , CUST_SCORE), -Aggr(Date,Date))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would give you list of cust_score separated by comma.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 10:40:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstsortedValue-Multiple-row-same-date/m-p/580355#M545583</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-03-31T10:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: [FirstsortedValue] Multiple row, same date</title>
      <link>https://community.qlik.com/t5/QlikView/FirstsortedValue-Multiple-row-same-date/m-p/580356#M545584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have same score on same date and you want min(Score) from that, use below..&lt;/P&gt;&lt;P&gt;FirstSortedValue(DISTINCT Aggr(Min(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;CUST_SCORE&lt;/SPAN&gt;),Date),-Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use Max if you want Max score for any date..&lt;/P&gt;&lt;P&gt;FirstSortedValue(DISTINCT Aggr(Max(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;CUST_SCORE&lt;/SPAN&gt;),Date),-Date)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 10:52:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstsortedValue-Multiple-row-same-date/m-p/580356#M545584</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-03-31T10:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: [FirstsortedValue] Multiple row, same date</title>
      <link>https://community.qlik.com/t5/QlikView/FirstsortedValue-Multiple-row-same-date/m-p/580357#M545585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you all for the answers ! It seems the best in this case is the Staffan solution ! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But&amp;nbsp; i'm really interested in tresesco expression, it doesn't work though, are you sure about syntax ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 11:56:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstsortedValue-Multiple-row-same-date/m-p/580357#M545585</guid>
      <dc:creator />
      <dc:date>2014-03-31T11:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: [FirstsortedValue] Multiple row, same date</title>
      <link>https://community.qlik.com/t5/QlikView/FirstsortedValue-Multiple-row-same-date/m-p/580358#M545586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try my code also. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;FirstSortedValue(distinct CUST_SCORE, -Date)&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: 12.800000190734863px;"&gt;Above code, will give you min(CUST_SCORE) if there are more than one CUST_SCORE on same date...&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: 12.800000190734863px;"&gt;In case, if you want max, you can use the above solution provided by myself.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 12:04:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstsortedValue-Multiple-row-same-date/m-p/580358#M545586</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-03-31T12:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: [FirstsortedValue] Multiple row, same date</title>
      <link>https://community.qlik.com/t5/QlikView/FirstsortedValue-Multiple-row-same-date/m-p/580359#M545587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are right, I did a little mistake in the expression.&lt;/P&gt;&lt;P&gt;Corrected one:&lt;/P&gt;&lt;P&gt;FirstSortedValue( Aggr(Concat(distinct CUST_SCORE, ',') , &lt;STRONG&gt;Date&lt;/STRONG&gt;), -Aggr(Date,Date))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aggregation had to be on Date field.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 12:05:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstsortedValue-Multiple-row-same-date/m-p/580359#M545587</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-03-31T12:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: [FirstsortedValue] Multiple row, same date</title>
      <link>https://community.qlik.com/t5/QlikView/FirstsortedValue-Multiple-row-same-date/m-p/580360#M545588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you also Manish, it seems to work also !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the perfect answer was &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;FirstSortedValue(distinct CUST_SCORE, -Date)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 13:25:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstsortedValue-Multiple-row-same-date/m-p/580360#M545588</guid>
      <dc:creator />
      <dc:date>2014-03-31T13:25:12Z</dc:date>
    </item>
  </channel>
</rss>

