<?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: How to get the number of sales of the best seller last year? FirstSortedValue and Count problem in Visualization and Usability</title>
    <link>https://community.qlik.com/t5/Visualization-and-Usability/How-to-get-the-number-of-sales-of-the-best-seller-last-year/m-p/2059305#M228016</link>
    <description>&lt;P&gt;Many thanks! It worked&lt;/P&gt;</description>
    <pubDate>Tue, 11 Apr 2023 20:13:47 GMT</pubDate>
    <dc:creator>ThiagoOliv</dc:creator>
    <dc:date>2023-04-11T20:13:47Z</dc:date>
    <item>
      <title>How to get the number of sales of the best seller last year? FirstSortedValue and Count problem</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/How-to-get-the-number-of-sales-of-the-best-seller-last-year/m-p/2058812#M227942</link>
      <description>&lt;P&gt;Hello guys.&lt;/P&gt;
&lt;P&gt;I'm new to this, and I'm trying hard to find an answer. Sorry if this is a common problem.&lt;/P&gt;
&lt;P&gt;I have database like this: &lt;STRONG&gt;Seller, OrderID, YearSale&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I'm tyring to display the number of sales of the best seller in the last year (of the filtered years, I need only the last one).&lt;/P&gt;
&lt;P&gt;I came up with:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;=count( { &amp;lt;YearSale={$(=num(max(YearSale)))}&amp;gt; + &amp;lt;FirstSortedValue(Seller, -Aggr(count({$&amp;lt;YearSale={$(=Max(YearSale))}&amp;gt;} distinct OrderID), Seller)) &amp;gt; } distinct [OrderID])&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I think I'm doing something simple in a hard way and honestly I don't know what's actually happening here.&lt;/P&gt;
&lt;P&gt;I'd apreciate any help.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 20:04:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/How-to-get-the-number-of-sales-of-the-best-seller-last-year/m-p/2058812#M227942</guid>
      <dc:creator>ThiagoOliv</dc:creator>
      <dc:date>2023-04-10T20:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the number of sales of the best seller last year? FirstSortedValue and Count problem</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/How-to-get-the-number-of-sales-of-the-best-seller-last-year/m-p/2058882#M227949</link>
      <description>&lt;P&gt;try below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;= FirstSortedValue(count({$&amp;lt;YearSale={$(=Max(YearSale))}&amp;gt;} distinct OrderID)&amp;nbsp; , -Aggr(count({$&amp;lt;YearSale={$(=Max(YearSale))}&amp;gt;} distinct OrderID), Seller))&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;OR&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;=Max&amp;nbsp; (&amp;nbsp; AGGR( count({$&amp;lt;YearSale={$(=Max(YearSale))}&amp;gt;} distinct OrderID) , Seller) )&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 03:33:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/How-to-get-the-number-of-sales-of-the-best-seller-last-year/m-p/2058882#M227949</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2023-04-11T03:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the number of sales of the best seller last year? FirstSortedValue and Count problem</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/How-to-get-the-number-of-sales-of-the-best-seller-last-year/m-p/2059305#M228016</link>
      <description>&lt;P&gt;Many thanks! It worked&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 20:13:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/How-to-get-the-number-of-sales-of-the-best-seller-last-year/m-p/2059305#M228016</guid>
      <dc:creator>ThiagoOliv</dc:creator>
      <dc:date>2023-04-11T20:13:47Z</dc:date>
    </item>
  </channel>
</rss>

