<?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 Firstsorted value with in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Firstsorted-value-with/m-p/1796047#M1211219</link>
    <description>&lt;P&gt;Hello guys&lt;/P&gt;&lt;P&gt;With the following expression I'm able to count the number of aircraft flying for a specific airline.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=count({&amp;lt;DASI ={'$(vData1)'},NCIA={$(vAirline)},ONGR={'0'}&amp;gt;} DISTINCT TAIL)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where:&lt;/P&gt;&lt;P&gt;- DASI is a date, (DD/MM/YY)&lt;BR /&gt;- NCIA is the airline Name&lt;BR /&gt;- ONGR is 0 or 1&lt;BR /&gt;- TAIL is the aircraft's registration mark (each aircraft has his own and individual tail)&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using this expression to count how many aircraft is flying each minute, thoughout the days... and &lt;STRONG&gt;now I would like to get the DATE where the maximum value was reached.&amp;nbsp;&lt;/STRONG&gt;Something like this: "The max valus is 55 on 27/03/21"&lt;/P&gt;&lt;P&gt;So, I was trying to use the following expression, which was working fine for some airlines, but it's not working for some others... (I'm just getting - as the output)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=Date(FirstSortedValue(TIMS, -Aggr(count({&amp;lt;NCIA={$(vAirline)},ONGR={'0'}&amp;gt;} DISTINCT TAIL), TIMS)), 'DD/MM/YY')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- TIMS is the date in timestamp format,&lt;/P&gt;&lt;P&gt;Do you guys have any idea about what's going on and how to solve this issue?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Wed, 31 Mar 2021 14:06:32 GMT</pubDate>
    <dc:creator>brunolelli87</dc:creator>
    <dc:date>2021-03-31T14:06:32Z</dc:date>
    <item>
      <title>Firstsorted value with</title>
      <link>https://community.qlik.com/t5/QlikView/Firstsorted-value-with/m-p/1796047#M1211219</link>
      <description>&lt;P&gt;Hello guys&lt;/P&gt;&lt;P&gt;With the following expression I'm able to count the number of aircraft flying for a specific airline.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=count({&amp;lt;DASI ={'$(vData1)'},NCIA={$(vAirline)},ONGR={'0'}&amp;gt;} DISTINCT TAIL)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where:&lt;/P&gt;&lt;P&gt;- DASI is a date, (DD/MM/YY)&lt;BR /&gt;- NCIA is the airline Name&lt;BR /&gt;- ONGR is 0 or 1&lt;BR /&gt;- TAIL is the aircraft's registration mark (each aircraft has his own and individual tail)&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using this expression to count how many aircraft is flying each minute, thoughout the days... and &lt;STRONG&gt;now I would like to get the DATE where the maximum value was reached.&amp;nbsp;&lt;/STRONG&gt;Something like this: "The max valus is 55 on 27/03/21"&lt;/P&gt;&lt;P&gt;So, I was trying to use the following expression, which was working fine for some airlines, but it's not working for some others... (I'm just getting - as the output)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=Date(FirstSortedValue(TIMS, -Aggr(count({&amp;lt;NCIA={$(vAirline)},ONGR={'0'}&amp;gt;} DISTINCT TAIL), TIMS)), 'DD/MM/YY')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- TIMS is the date in timestamp format,&lt;/P&gt;&lt;P&gt;Do you guys have any idea about what's going on and how to solve this issue?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 14:06:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Firstsorted-value-with/m-p/1796047#M1211219</guid>
      <dc:creator>brunolelli87</dc:creator>
      <dc:date>2021-03-31T14:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: Firstsorted value with</title>
      <link>https://community.qlik.com/t5/QlikView/Firstsorted-value-with/m-p/1796133#M1211235</link>
      <description>&lt;P&gt;It could be that you have multiple dates with the same value. Try adding DISTINCT keyword to FirstSortedValue().&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 17:32:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Firstsorted-value-with/m-p/1796133#M1211235</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2021-03-31T17:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: Firstsorted value with</title>
      <link>https://community.qlik.com/t5/QlikView/Firstsorted-value-with/m-p/1796137#M1211236</link>
      <description>&lt;P&gt;WOW!!!&lt;/P&gt;&lt;P&gt;You are the best...&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 17:37:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Firstsorted-value-with/m-p/1796137#M1211236</guid>
      <dc:creator>brunolelli87</dc:creator>
      <dc:date>2021-03-31T17:37:42Z</dc:date>
    </item>
  </channel>
</rss>

