KNOWLEDGE BASE

Google BigQuery Count Distinct Data is Incorrect


Published: 19 Jan 2016
Last Modified Date: 06 Jun 2017

Issue

When using CountD in a live connection to BigQuery, you get different results than from the same data when extracted.

Environment

  • Tableau Desktop 9.2
  • Google BigQuery

Resolution

Option 1

Extract the data, if an exact amount is needed. However, due to the large volume of data on BigQuery this is not recommended.

Option 2

Using EXACT_COUNT_DISTINCT()  or COUNT(distinct field, 1000000).

Option 3

Alternatively, follow the workaround described in this external article: https://www.interworks.com/blog/aball/2015/09/29/tableau-tip-count-distincts-google-bigquery

Cause

Google BigQuery provides a statistical approximate for CNTD queries.
Did this article resolve the issue?