<?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 unique values in a table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-unique-values-in-a-table/m-p/517594#M1122183</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=avg(DISTINCT Hoursnotavailable) as the expression and vehicle as the dimension in a bar chart will give you what you are looking for. See attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jan 2014 15:31:25 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-01-15T15:31:25Z</dc:date>
    <item>
      <title>Count unique values in a table</title>
      <link>https://community.qlik.com/t5/QlikView/Count-unique-values-in-a-table/m-p/517591#M1122178</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 have a problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a column with vehicle no's and a column with time not available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vehicle 1 is 2 times in the table. Now I want to count this vehicle 1 time instead of 2 times, so it's not &lt;/P&gt;&lt;P&gt;a simple count I guess...? I want to know how many unique vehicles there are in the table.&lt;/P&gt;&lt;P&gt;IN this example there 7 rows but 4 unique vehicles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to calculate the average time not available, for vehicle 1 this is 2+4 hours = 6 = 3 hours average.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What kind of formula can I use for this? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please assist!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="192"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" width="64"&gt;Vehicle&lt;/TD&gt;&lt;TD class="xl63" width="128"&gt;Hours not available&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;1&lt;/TD&gt;&lt;TD align="right"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;2&lt;/TD&gt;&lt;TD align="right"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;3&lt;/TD&gt;&lt;TD align="right"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;1&lt;/TD&gt;&lt;TD align="right"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;2&lt;/TD&gt;&lt;TD align="right"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;3&lt;/TD&gt;&lt;TD align="right"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;4&lt;/TD&gt;&lt;TD align="right"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jan 2014 15:19:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-unique-values-in-a-table/m-p/517591#M1122178</guid>
      <dc:creator />
      <dc:date>2014-01-15T15:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: Count unique values in a table</title>
      <link>https://community.qlik.com/t5/QlikView/Count-unique-values-in-a-table/m-p/517592#M1122180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Avg([Hours not available])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jan 2014 15:21:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-unique-values-in-a-table/m-p/517592#M1122180</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-15T15:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: Count unique values in a table</title>
      <link>https://community.qlik.com/t5/QlikView/Count-unique-values-in-a-table/m-p/517593#M1122182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ANd how can I count the vehicles then? I want to know that there are 4 unique vehicles in this table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in this table are 4 unique vehicles, vehicle 1 avg time not available is 3 hours, etc. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jan 2014 15:25:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-unique-values-in-a-table/m-p/517593#M1122182</guid>
      <dc:creator />
      <dc:date>2014-01-15T15:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Count unique values in a table</title>
      <link>https://community.qlik.com/t5/QlikView/Count-unique-values-in-a-table/m-p/517594#M1122183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=avg(DISTINCT Hoursnotavailable) as the expression and vehicle as the dimension in a bar chart will give you what you are looking for. See attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jan 2014 15:31:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-unique-values-in-a-table/m-p/517594#M1122183</guid>
      <dc:creator />
      <dc:date>2014-01-15T15:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Count unique values in a table</title>
      <link>https://community.qlik.com/t5/QlikView/Count-unique-values-in-a-table/m-p/517595#M1122184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;create a straight table chart with vehicle as dimension and expressions :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Avg([Hours not available]) as jeffrey suggested&lt;/P&gt;&lt;P&gt;- count(vehicle) to count how many times it was not available&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As it is a chart, every vehicle will show up once&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jan 2014 15:35:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-unique-values-in-a-table/m-p/517595#M1122184</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2014-01-15T15:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Count unique values in a table</title>
      <link>https://community.qlik.com/t5/QlikView/Count-unique-values-in-a-table/m-p/517596#M1122185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Count(DISTINCT Vehicle)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although, I'm not entirely clear on what you're trying to accomplish.&amp;nbsp; If you want the average time for each vehicle, then you would create a "Straight Table" chart with Vehicle as the dimension and Avg([Hours not available]) as the expression.&amp;nbsp; If you want to know how many unique vehicles you have then either a Text Box or a "Straight Table" chart with no dimension and the expression Count(DISTINCT Vehicle).&amp;nbsp; I guess that you could put them both in the same chart and keep expression totals on.&amp;nbsp; That way the totals at the top would show the total average and the total count of unique vehicles.&amp;nbsp; Each row of the chart would show the average time and 1 for unique vehicles.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jan 2014 15:39:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-unique-values-in-a-table/m-p/517596#M1122185</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-15T15:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Count unique values in a table</title>
      <link>https://community.qlik.com/t5/QlikView/Count-unique-values-in-a-table/m-p/517597#M1122186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Count(distinct Vehicle) should return what you need&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jan 2014 15:40:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-unique-values-in-a-table/m-p/517597#M1122186</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2014-01-15T15:40:42Z</dc:date>
    </item>
  </channel>
</rss>

