<?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: Count Distinct numbers using FirstSortedValue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114388#M463663</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not 100% sure, but can you try the below expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count(Aggr(&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;FirstSortedValue(Distinct [Serial Number], EntryTimestamp), EntryTimestamp))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Jun 2016 20:08:52 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-06-14T20:08:52Z</dc:date>
    <item>
      <title>Count Distinct numbers using FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114386#M463661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to do a count using the below expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=AGGR(count ({&amp;lt;DataValue = {"True"}, ParameterChildName = {"SigPod_AirTest_1_Status.Test_Passed"}, EntryTimestamp = {'$(=MIN(EntryTimestamp))'}&amp;gt;} distinct [Serial Number]),EntryTimestamp)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result returns 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should I be using FirstSortedValue in the Set Expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I am trying to count the number of Serial Numbers where the Data Value is True and the &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;ParameterChildName = &lt;SPAN style="font-size: 13.3333px;"&gt;SigPod_AirTest_1_Status.Test_Passed and I want to only count the Serial Numbers for the first Entrytimestamp as there can be multiple.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I understand I can count the distinct Serial numbers using DataValue and ParameterChildname, but I need to inlude only the first instance of each EntryTimestamp.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I hope you can help&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Al&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 19:57:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114386#M463661</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2016-06-14T19:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct numbers using FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114387#M463662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following which returns the First Serial Number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue(Aggr( distinct [Serial Number], EntryTimestamp), Aggr(EntryTimestamp,EntryTimestamp))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I need to count the Serial Numbers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 20:03:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114387#M463662</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2016-06-14T20:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct numbers using FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114388#M463663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not 100% sure, but can you try the below expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count(Aggr(&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;FirstSortedValue(Distinct [Serial Number], EntryTimestamp), EntryTimestamp))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 20:08:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114388#M463663</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-14T20:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct numbers using FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114389#M463664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That Returns 250.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it returns all of the EntryTimestamps not the first for each Serial Number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are 5 records that contain 2 Entrytimestamps, so the result I need is 245&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help, I can use this and make changes to check the results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 20:18:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114389#M463664</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2016-06-14T20:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct numbers using FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114390#M463665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On another thought if EntryTimestamp is truly a timestamp field, may be you only have one serial number available?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 20:18:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114390#M463665</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-14T20:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct numbers using FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114391#M463666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=Count(Aggr(FirstSortedValue(Distinct [Serial Number], EntryTimestamp), [Serial Number]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This returned the correct result, but I need to double check I have the correct Serial Numbers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Al.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 20:20:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114391#M463666</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2016-06-14T20:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct numbers using FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114392#M463667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I might be totally misguiding you, but can you try this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;Count({&amp;lt;DataValue = {"True"}, ParameterChildName = {"SigPod_AirTest_1_Status.Test_Passed"}&amp;gt;} Distinct &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;EntryTimestamp&lt;/SPAN&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 20:23:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114392#M463667</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-14T20:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct numbers using FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114393#M463668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This would calculate all the timestamps one time and I guess this is what you are trying to do. You are wanting to calculate 1st serial number for each timestamp. Does it matter if serial number is 10 or 100? We are just doing a count here. If you want to know what the value of the serial number, then this become a little more complex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 20:25:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114393#M463668</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-14T20:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct numbers using FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114394#M463669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to get the Serial Numbers for each of the First EntryTimestamp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I don't need to use Distinct, as &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;{&amp;lt;DataValue = {"True"}, ParameterChildName = {"SigPod_AirTest_1_Status.Test_Passed"}&amp;gt;}&amp;nbsp; + the FirstSortedValue should provide what I need&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 20:26:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114394#M463669</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2016-06-14T20:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct numbers using FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114395#M463670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I still don't have the correct expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 20:27:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114395#M463670</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2016-06-14T20:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct numbers using FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114396#M463671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this maybe it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Count({&amp;lt;DataValue = {"True"},ParameterChildName = {"SigPod_AirTest_1_Status.Test_Passed"}&amp;gt;} Aggr(FirstSortedValue(Distinct [Serial Number], EntryTimestamp), [Serial Number]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but again, I need to double check my results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 20:29:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114396#M463671</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2016-06-14T20:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct numbers using FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114397#M463672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I might be repeating myself, but do you want the value of serial number or the count?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 20:44:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114397#M463672</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-14T20:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct numbers using FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114398#M463673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Count of the Serial Numbers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 20:46:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-numbers-using-FirstSortedValue/m-p/1114398#M463673</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2016-06-14T20:46:52Z</dc:date>
    </item>
  </channel>
</rss>

