How To Returns the distinct count of items using Calculated Field in Looker |

Опубликовано: 05 Октябрь 2024
на канале: The Data Millennials
1,241
4

Hey everyone Welcome to Data Millennials, I am Atul and in this video we are going to discuss How we can apply or use COUNT_DISTINCT function using Calculated Field in Looker or Google Data Studio.

So in this video we are going to apply or use the COUNT_DISTINCT function as a calculated field in our charts or tables from scratch so that you can get the awareness that when where and how we can apply the COUNT_DISTINCT function using calculated field,

And before we use this function, let's understand the COUNT_DISTINCT function first.

Count_distinct is a type of Aggregation function in looker.
The COUNT_DISTINCT function counts the number of unique items in a field.


Syntax→ COUNT_DISTINCT(value)

Parameters value → it is a field or expression that contains the items to be counted.

As we have successfully applied and use the COUNT_DISTINCT function using calculated field you might have a question in your mind that How does this COUNT_DISTINCT function works

The COUNT_DISTINCT function takes 1 parameter, which can be the name of a metric, dimension, or expression of any type. COUNT_DISTINCT returns the total number of unique items in that field or expression.

Limits of COUNT_DISTINCT
You can't apply this function to a pre-aggregated field (Aggregation type of Auto), or to an expression which is the result of another aggregation function.

You can follow us on the below social media handles:-
Blog: - https://thedatamillennials.blogspot.com/
Facebook:-   / the-data-millennials-596575371027542  
Instagram: -   / the_data_millennials  
LinkedIn: -   / data-millennials-6b5a031b3  
Twitter: -   / datamillennials  


If you want to be become an Data Analyst or Business Analyst who has a great Excel Skill then you can follow the below link

Excel Playlist:-https://bit.ly/3rd9cEH

If you want to become an Data Analyst or Business Analyst who has a brilliant SQL Skills then you can follow the below link

SQL Playlist:- https://bit.ly/3v28GKY

If you want to become an excellent Data visualization Analyst then you can follow the below link

Google Data Studio playlist:- https://bit.ly/3v7czyc