<?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 Sum Distinct *Attached file included in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-Distinct-Attached-file-included/m-p/559506#M208799</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Due to data is not 'clean' enough, I experienced data that has these fields. Please see attached&lt;/P&gt;&lt;P&gt;Bus_ID act as as unique of individual bus&lt;/P&gt;&lt;P&gt;Bus Name is the name of the bus&lt;/P&gt;&lt;P&gt;Date is the date the bus starts it journey&lt;/P&gt;&lt;P&gt;Bus_Passenge is the amount of passenger the bus take&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see from the table, Bus_ID 411 and 800 have duplicate record. Due to the user wrong input on the Bus_ID, it count it as two recrods. Therefore when i try to find the total passenger, it added all even though it is suppose to be one record(400) for bus ID 411.&lt;/P&gt;&lt;P&gt;Is there anyway I can do the sum of the passenger by having one record for each bus _ID. It only takes in record that has the earliest date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Bennn Bennn&#xD;
&#xD;
New file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Sep 2013 09:13:41 GMT</pubDate>
    <dc:creator>n1ef5ng1</dc:creator>
    <dc:date>2013-09-24T09:13:41Z</dc:date>
    <item>
      <title>Sum Distinct *Attached file included</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Distinct-Attached-file-included/m-p/559506#M208799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Due to data is not 'clean' enough, I experienced data that has these fields. Please see attached&lt;/P&gt;&lt;P&gt;Bus_ID act as as unique of individual bus&lt;/P&gt;&lt;P&gt;Bus Name is the name of the bus&lt;/P&gt;&lt;P&gt;Date is the date the bus starts it journey&lt;/P&gt;&lt;P&gt;Bus_Passenge is the amount of passenger the bus take&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see from the table, Bus_ID 411 and 800 have duplicate record. Due to the user wrong input on the Bus_ID, it count it as two recrods. Therefore when i try to find the total passenger, it added all even though it is suppose to be one record(400) for bus ID 411.&lt;/P&gt;&lt;P&gt;Is there anyway I can do the sum of the passenger by having one record for each bus _ID. It only takes in record that has the earliest date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Bennn Bennn&#xD;
&#xD;
New file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 09:13:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Distinct-Attached-file-included/m-p/559506#M208799</guid>
      <dc:creator>n1ef5ng1</dc:creator>
      <dc:date>2013-09-24T09:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Distinct *Attached file included</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Distinct-Attached-file-included/m-p/559507#M208800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;any help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 05:56:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Distinct-Attached-file-included/m-p/559507#M208800</guid>
      <dc:creator>n1ef5ng1</dc:creator>
      <dc:date>2013-09-25T05:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Distinct *Attached file included</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Distinct-Attached-file-included/m-p/559508#M208801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you try to separate the datas in the script.&lt;/P&gt;&lt;P&gt;One dimension table with the bus datas and one fact table with the journey datas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;[Bus]:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Bus_ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;%Key_Bus_Id&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Bus_Name&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Bus_Passenger&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Sheet1;&lt;BR /&gt;&lt;BR /&gt;[Journey]:&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Bus_id&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;%Key_Bus_Id&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Sheet1;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;DROP&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Sheet1; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;After that you can sum without any specific formula.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 06:40:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Distinct-Attached-file-included/m-p/559508#M208801</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-25T06:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Distinct *Attached file included</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Distinct-Attached-file-included/m-p/559509#M208802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Benn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;test qvw. is empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;attach some data or provide file for further assistance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 06:42:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Distinct-Attached-file-included/m-p/559509#M208802</guid>
      <dc:creator>ashwanin</dc:creator>
      <dc:date>2013-09-25T06:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Distinct *Attached file included</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Distinct-Attached-file-included/m-p/559510#M208803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In case of duplicate values make straight table with expression as distinct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g count(distinct(passenger))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 06:44:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Distinct-Attached-file-included/m-p/559510#M208803</guid>
      <dc:creator>ashwanin</dc:creator>
      <dc:date>2013-09-25T06:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Distinct *Attached file included</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Distinct-Attached-file-included/m-p/559511#M208804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the expression:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Sum(Aggr((FirstSortedValue(Bus_Passenger,Date)),Bus_ID))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PFA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 07:47:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Distinct-Attached-file-included/m-p/559511#M208804</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-09-25T07:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Distinct *Attached file included</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Distinct-Attached-file-included/m-p/559512#M208805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I realized the exmaplethat I gave is not accurate enough.&lt;/P&gt;&lt;P&gt;the sum of the passenger is not a distinct value. Is an individual recrodt that sum up the value of passenger in a bus.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;That is why if i will to use firstsorted value, it will give 1 as the output as each record stands for 1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 09:29:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Distinct-Attached-file-included/m-p/559512#M208805</guid>
      <dc:creator>n1ef5ng1</dc:creator>
      <dc:date>2013-09-25T09:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Distinct *Attached file included</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Distinct-Attached-file-included/m-p/559513#M208806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Bennn,&lt;/P&gt;&lt;P&gt;Please explain a bit more. Would be better if you can share a sample data in excel with desired result described.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 09:36:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Distinct-Attached-file-included/m-p/559513#M208806</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-09-25T09:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Distinct *Attached file included</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Distinct-Attached-file-included/m-p/559514#M208807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok give me five minutes. hope you are still online&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 09:40:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Distinct-Attached-file-included/m-p/559514#M208807</guid>
      <dc:creator>n1ef5ng1</dc:creator>
      <dc:date>2013-09-25T09:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Distinct *Attached file included</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Distinct-Attached-file-included/m-p/559515#M208808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Edit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the new attached file, there are individual record on the table.When i sum up the bus_passenger, it will take all the records. However, due to data are not clean, some records are not means to gel together. Notably BMW, it has three different date, 07, 08, and 18. Logically, I would want BMW to only take 07 records, earliest record, which is suppose to be 300 rather than 1200.&lt;/P&gt;&lt;P&gt;Another example will be Audi, where there is two date, 09 and 20. Suppose to take earliest which is 09, value will be 590 compare to 1380 currently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks very much&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 09:50:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Distinct-Attached-file-included/m-p/559515#M208808</guid>
      <dc:creator>n1ef5ng1</dc:creator>
      <dc:date>2013-09-25T09:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Sum Distinct *Attached file included</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Distinct-Attached-file-included/m-p/559516#M208809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You missed the new attachment. If you meant the latest date, try :&lt;EM&gt;Sum(Aggr((FirstSortedValue(Bus_Passenger,&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;-&lt;/STRONG&gt;&lt;/SPAN&gt;Date)),Bus_ID))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Note: a '-' symbol before Date changes the sort order.&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 10:28:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Distinct-Attached-file-included/m-p/559516#M208809</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-09-25T10:28:12Z</dc:date>
    </item>
  </channel>
</rss>

