<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/jive/rss" version="2.0">
  <channel>
    <title>Content in Tableau Community Forums</title>
    <link>/profile-content.jspa?filterID=contentstatus[published]&amp;targetUser=23292</link>
    <description>Recent content in Tableau Community Forums</description>
    <language>en</language>
    <pubDate>Tue, 02 Jul 2013 18:35:05 GMT</pubDate>
    <generator>Jive Engage 8.0.5.0  (http://jivesoftware.com/products/)</generator>
    <dc:date>2013-07-02T18:35:05Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Count distinct with Google Bigquery not working</title>
      <link>https://community.tableau.com/thread/127602</link>
      <description>&lt;!-- [DocumentBodyStart:0a0232c8-c0dc-4e3e-aa8f-a2530e6be533] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Hello,&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;I'm using Google bigquery as datasource, and i would like to control my data by checking if the Number of rows is equal to the Count distinct on my primary ID column. Theorically yes it should.&lt;/p&gt;&lt;p&gt;Here is my database schema :&lt;/p&gt;&lt;p&gt;- visitor_id ( unique ID, integer )&lt;/p&gt;&lt;p&gt;- first_name (string)&lt;/p&gt;&lt;p&gt;- last_name (string)&lt;/p&gt;&lt;p&gt;- created_at (timestamp)&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;When I calculate the count distinct with a basic sql request, I get the same result as the number of rows.&lt;/p&gt;&lt;p&gt;But when I calculate the count distinct with Tableau 8, I get the following results:&lt;/p&gt;&lt;p&gt;- SUM(Number of rows) -&amp;gt; 218.570&lt;/p&gt;&lt;p&gt;- CNTD(visitor_id) -&amp;gt; 215.487&lt;/p&gt;&lt;p&gt;I don't do anything else on my workbook, no filters, etc..&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;So I don't understand how Tableau 8 is calculating... why the two values aren't the same?&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #111111; font-family: Arial, sans-serif, 'Nimbus Sans L'; font-size: 12px;"&gt;Thanks for your help.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:0a0232c8-c0dc-4e3e-aa8f-a2530e6be533] --&gt;</description>
      <category domain="https://community.tableau.com/tags#/?containerType=14&amp;container=2003">google</category>
      <category domain="https://community.tableau.com/tags#/?containerType=14&amp;container=2003">count_distinct</category>
      <category domain="https://community.tableau.com/tags#/?containerType=14&amp;container=2003">bigquery</category>
      <pubDate>Tue, 02 Jul 2013 18:35:05 GMT</pubDate>
      <author>tableaucommunity@tableau.com</author>
      <guid>https://community.tableau.com/thread/127602</guid>
      <dc:date>2013-07-02T18:35:05Z</dc:date>
      <clearspace:dateToText>5 years 12 months ago</clearspace:dateToText>
      <clearspace:replyCount>11</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
  </channel>
</rss>

