<?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: FirstSortedValue, Aggr and Count with Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Aggr-and-Count-with-Set-Analysis/m-p/1067740#M929306</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Count{&amp;lt;orderID = {"=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;FirstSortedValue(location,-seq_no)='Paris'"&lt;/SPAN&gt;}&amp;gt;} DISTINCT orderID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besides this, I think your expression in your first table could just be&lt;/P&gt;&lt;P&gt;=Count(DISTINCT orderID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: missed a closing bracket&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Mar 2016 14:57:34 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-03-24T14:57:34Z</dc:date>
    <item>
      <title>FirstSortedValue, Aggr and Count with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Aggr-and-Count-with-Set-Analysis/m-p/1067737#M929303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am looking to get a value in a Text Object. I have created a Straight table with the correct numbers but am struggling to get a single number in a Text object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The dimension on the table is:&lt;/P&gt;&lt;P&gt;=aggr(FirstSortedValue(location,-seq_no),orderID)&lt;/P&gt;&lt;P&gt;(This gives me the list of last locations for all orders)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression is:&lt;/P&gt;&lt;P&gt;=count(aggr(FirstSortedValue(location,-seq_no),&lt;SPAN style="font-size: 13.3333px;"&gt;orderID&lt;/SPAN&gt;))&lt;/P&gt;&lt;P&gt;(This gives me the number of order in last location)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each order has several locations. I am looking for the count of an order in a certain locations it was last in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking to get a Text Object telling me the number of orders that were last in 1 particular location.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try the following I get a count of all orders that have passed thought the location. Not only the ones that have that location as last in their sequence.&lt;/P&gt;&lt;P&gt;=count({&amp;lt; location = {'Paris'}&amp;gt;} aggr(FirstSortedValue(location,-seq_no),&lt;SPAN style="font-size: 13.3333px;"&gt;orderID&lt;/SPAN&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anybody help here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Aggr-and-Count-with-Set-Analysis/m-p/1067737#M929303</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue, Aggr and Count with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Aggr-and-Count-with-Set-Analysis/m-p/1067738#M929304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you check if this makes any difference:&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; font-size: 13px;"&gt;&lt;STRONG&gt;=Count({&amp;lt;location = {'Paris'}&amp;gt;} aggr(FirstSortedValue(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;{&amp;lt;location = {'Paris'}&amp;gt;}&lt;/SPAN&gt; &lt;/SPAN&gt;location,-seq_no),&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;orderID&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2016 14:52:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Aggr-and-Count-with-Set-Analysis/m-p/1067738#M929304</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-24T14:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue, Aggr and Count with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Aggr-and-Count-with-Set-Analysis/m-p/1067739#M929305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That does not make a difference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2016 14:57:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Aggr-and-Count-with-Set-Analysis/m-p/1067739#M929305</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-03-24T14:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue, Aggr and Count with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Aggr-and-Count-with-Set-Analysis/m-p/1067740#M929306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Count{&amp;lt;orderID = {"=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;FirstSortedValue(location,-seq_no)='Paris'"&lt;/SPAN&gt;}&amp;gt;} DISTINCT orderID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besides this, I think your expression in your first table could just be&lt;/P&gt;&lt;P&gt;=Count(DISTINCT orderID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: missed a closing bracket&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2016 14:57:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Aggr-and-Count-with-Set-Analysis/m-p/1067740#M929306</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-03-24T14:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue, Aggr and Count with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Aggr-and-Count-with-Set-Analysis/m-p/1067741#M929307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That did the trick.&lt;/P&gt;&lt;P&gt;Thanks for simplifying the first table as well.&lt;/P&gt;&lt;P&gt;The use of double quotes is new to me in the set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2016 15:10:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Aggr-and-Count-with-Set-Analysis/m-p/1067741#M929307</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-03-24T15:10:32Z</dc:date>
    </item>
  </channel>
</rss>

