tableau count distinct if contains During one of my talks at Tableau Conference 2018 I we also need to check that the distinct count of Sub-Categories at the State level is equal to the distinct count of Sub-Category values in Both of the functions, Count and Count Distinct, when searching through the available data ignore all null values and only return the number of fields or unique fields that contain information. It is also, however, one of the more intensive calculations to perform and can be very slow In Tableau 2020. I have a love / hate relationship with the Attribute function in Tableau. The alternative would be to ask Tableau to do the unique count, which would require extracting every unique username. However, if the count or countd functions are being used on a dimension and the dimension may contain null values, the function will still return the Count function - Simply returns the numeric count of records - Is normally supplied with an expression before performing a count - Will contain duplicates if duplicates occur in the relevant column. The first stop in my journey to understand the Attribute function was the Tableau online help. Nothing special so far, we are using the CONTAINS function to determine whether the Product Name dimension contains the Exclude phrase string. Using COUNT in Tableau to count observations by group. Select Analysis > Create To help Tableau rookies, we’re starting from square one with the Tableau Essentials blog series. Taking distinct counts in Tableau is incredibly easy with a one-click way to change aggregations to count distinct. Navigate to a worksheet. Counting a row in the “one” table requires a distinct count aggregation on a non-null unique identifier (known as a primary key). The Tableau If statement returns the result only if the given condition is True; otherwise, it returns nothing. Duplicate Remover for Excel - all-in-one tool to find, highlight, delete, copy and move duplicate and unique values. More Tableau CONTAINS Function. For larger data sets, you may want to switch to a formula based on the FREQUENCY function. In Tableau (in this case, the 64-bit Tableau Desktop Public Edition, on Windows 10), we connect to our data file as a text file. Non-aggregate variables and at the “row level” in the data and normally need to be aggregated by Tableau – so you’ll see their pills with an aggregation wrapped around them in sum © 2021 Tableau Software, LLC, a Salesforce Company. The COUNTIF function can help to count cells that contain part of text in a range of cells in Excel. In this video, learn how to count occurrences and distinct items. When the calculation window opens, there is a Functions dropdown list that contains the string-specific functions. TIP: Use COUNTD How to get bar chart with distinct count based on a column in tableau? 1. This gives you more options for combining data using schemas to fit your analysis. Select String from the dropdown to get familiar with all the different string functions available on Tableau. We can count the cells based on partial match criteria. I can't use the filter function because I'd need to compare the afore mentioned measure to a count of all distinct orders. Taking distinct counts in Tableau is incredibly easy with a one-click way to change aggregations to count distinct. 2 Many Distinct Count Problem Considerastream Dof(item,label)pairs(x 1,ℓ 1), ,(x T,ℓ T) and the following queries that define the many distinct count problem. If you're grouping by Color and only Color in the view, then you can simply use SUM(Number of Records) . This is done by the fixed part of the formular which counts the rows that have the same value in the Question column. CountDistinct Returns the number of unique values in Learn the Differences Between Business Intelligence Software Stacks. The following Excel formula Counts if a Cell contains Partial Text. If you later need to access the original data source file contained within the packaged workbook, the point at the file, right-click, and select the This article contains and describes formulas that calculate the following: The number of occurrences of a text string in a range of cells. About Distinct Count Measures. The fields are various text responses so, I just want to count it. Returns true or false. Select Analysis > Create Calculated Field. Select a blank cell (such as E5), copy the below formula into it and then press the Enter key. Since there are so many cool features to cover in Tableau, the series will include several different posts. If their name are the same but phone number is different, then it should count as two unique distinct value instead of 1. That is how to use the COUNT and COUNTD (Count Distinct) functions properly in Tableau. Note that the returned value for I have a question why does tableau show incorrect data for example Below image shows data is 743 i am counting by ID distinct But when Distinct counts are critical to analytics, whether it's counting individual patients in a hospital, the number of unique retail transactions, or the number of airplanes in a fleet. I need to consider column B, their phone number as well. Cause By default, Grand Totals will match the aggregation of the field being totaled. I am not sure why the result was null in cases where the above condition was true See full list on educba. Count If Cell Contains Partial Text. The AVG is only there because Tableau needs an aggregeation there. The series is intended to be an easy-to-read reference on the basics of using Tableau Software, particularly Tableau Desktop. So let’s begin with String Functions in Tableau. CASE CONTAINS(ATTR([Subject]), "List Email:") WHEN TRUE then ATTR({ FIXED [Subject] : COUNTD([Subject])}) ELSE ATTR({ FIXED [Subject] : COUNT([Subject])}) END Count (Distinct) Returns the number of unique values in a measure or dimension. Null values are ignored in all cases. Slow Performance? This is a cool and elegant formula, but it calculates much more slowly than formulas that use FREQUENCY to count unique values. Just in case if you have a table, place COUNTD(Col2) into the Text shelf instead. I'd like to combine the count of unique dimensions in these 3 columns and display the sum in a treemap. And if it doesn't, it will return false. Tableau Desktop Answer. COUNT([OrderQuantity]) Click OK to close the window. All Rights Reserved. If the status is Complete distinct count the RecordID. 3 and I'm trying to find out how to group on each of the values that I find after making a "count of distinct values". Count all values or distinct values in a data set - Tableau Tutorial From the course: Tableau 10: Mastering Calculations Start my 1-month free trial 1. This post will show you how to leverage the custom sorting function of table calculations in Tableau to visualize a reverse running total. Go to Analysis > Create Calculated Field. It can’t be shared alone as it contains only instructions, and the data source needs to be attached separately. It provides a wide variety of charts to explore your data easily and effectively. No data warehouse necessary. And then I want to work on the product name field, so I'm counting the number of products, so type a left square bracket. To explain what the formular does: It takes the count of the answers that are over the threshold and devides it by the count of answers for each question. Finally Tableau uses the AS [field name] aliasing option to ensure that the name used by Tableau is a usable name in Tableau. These functions count records in different ways. From the Data pane, under Dimensions, drag Order ID to the Rows shelf. Hot Network Questions Learn how to quickly count the number of rows in your data sets in Tableau with this quick tutorial on the automatically created calculated field "Number of Tableau provides a logical statement to check a particular condition, represented by an expression, against a certain value or assumption, to determine whether a given condition is TRUE or FALSE, based on which certain tasks get performed if the condition is met, so as to facilitate correct and effective decision making is termed as Tableau IF Rather than adding up value totals, Tableau lets you find how many of an item, and how many unique items, appear in a field. So, it should count 2 candid for the date 2/6/10 in the above example. Performing a Count Distinct on the Region field returns a value of 20. Please like and subscribe. When applied to a dimension, Tableau creates a new temporary column that is a measure because the result of a count is a number. - [Instructor] Large data collections tend to contain…a lot of repeated values. In this guide, you will learn how to create conditional calculations with built-in functions in Tableau. For more information about Level of Detail functions, see Level of Detail. 6k points) I have a tableau data grid that I need to count distinct records. #2 Count Cells when Criteria is NOT EQUAL to a Specified text. g. Count Returns the number of rows in a measure or a dimension. It took me a long time to wrap my head around what ATTR() does in Tableau. The syntax of this Tableau COUNT is as shown below: COUNT(Expression) Here, we are creating a new field called Count_Orders. Show In/Out members in a set. If you have a project Tableau CONTAINS Function. Count Distinct function - Returns the unique or distinct numeric count of records - Is normally supplied with an expression before performing a count Tableau being a typical visual analytics tool, it employs every feature to come up with interactive and insightful analysis through visualizations. Tried creating groups, but that just concatenates the columns. arg from Tableau, and these number will change if the parameter changes. Some database technologies have restrictions that stop Tableau communicating with them as they would like. , the distinct number of customers. So if a specific customer ID appears multiple times, Tableau will count these as individual items in its chart. The Tableau COUNT function is one of the Tableau aggregate function, which is used to find the number of not null values. The most common problem caused by this (in my experience) is the absence of COUNT DISTINCT when using Excel as a data source. And does not take into account duplication. The fields are various text responses so, I just want to count it. When it's building a visualization, Tableau will look at the data source and then build the visualization with an extract. The number of words (or text strings) separated by a character in a cell. I am facing issues in replicating the same COUNTIF task in tableau. Tableau count number of records with same value. This mode separates the set into two categories: In - The members in the set. The . The term is often used when the term byte might be ambiguous, as the byte has historically been used for storage units of a variety of sizes. …One way to analyze your data is to discover the number…of orders for products in a specific category or by counting…the number of distinct items within each According to Tableau's documentation, you cannot count the distinct number of items in a group, e. The series is intended to be an easy-to-read reference on the basics of using Tableau Software, particularly Tableau Desktop. When looking at different granularities of data, Tableau users often opt for showing each hierarchy of data using the higher level and lower level as blue pulls in your rows to create images like the one on the bottom left. The syntax of this Tableau CONTAINS Function is: CONTAINS(string, substring) The below Tableau contains statement checks whether the records present in the Department column contains I want to use an expression, that could count distinct Candid , but if a candid is repeated 3 time (as in the above case) on a single date, it should count it as one. Null values are not counted. The R code has a function which is returning a bunch of 100 and 50 in a function passing . SQL doesn’t care about spaces & line feeds, we could write SELECT DISTINCT [table]. The Count Distinct is calculated at the Region level and then the values are summed in the rows as well as the totals. From the Data pane, drag State to the Rows shelf. This means that there was at least one item returned in 296 distinct orders. We will discuss all twenty Tableau String Functions including ASCII, CHAR, CONTAINS String functions with examples. Additional Information In Tableau Desktop, connect to the Sample - Superstore saved data source, which comes with Tableau. Products Tableau Desktop Tableau Server Tableau Online Tableau Prep Tableau Public Free In this Tableau tutorial, we are going out to learn about string functions in tableau. Try these 8 alternatives to Count Distinct for faster processing of data Question How to count the number of times a particular text string occurs within a dimension. 15. Please give me some advice on how should i setup my formulae. I've got 3 columns: Type 1, Type 2, Type 3. Level of detail expressions are unique in Tableau in that you can use an aggregate of an aggregate. You can select function from the drop-down menu or you can search in the text box as shown in Figure 2. Since there are so many cool features to cover in Tableau, the series will include several different posts. Environment Tableau Desktop Answe These two count functions are used regularly in Tableau, but it's easy to make mistakes when writing formulas with these functions . twbx) bundle the data and metadata into a single file. Hot Network Questions I have TOTAL as a calculated field on Tableau, which is further connected to R studio to create outputs through R. Since there are so many cool features to cover in Tableau, the series will include several different posts. For example, you could visualize the number of unique customers who placed an order in the last 60 days, which I will demonstrate with the most recent sample superstore data set included with version 2019. This series of guides - Tableau Playbook - will introduce all kinds of common charts in Tableau. Please do as follows. The number of occurrences of a character in a range of cells. Navigate to a worksheet. The number of occurrences of a character in one cell. I'd like to create a measure that give me the sum of a distinct count of order numbers but only if they include a certain item number. ie. To illustrate the case I have made a fictive dataset that includes 58 rows (buys), 7 different IDs (customers) and 5 different products. I'm using Tableau 8. Packaged workbooks (. The Tableau CONTAINS function returns True if the specified substring is present in the original string; otherwise, it returns false. Similar to what we saw in the above example, you can also count cells that do not contain a specified text. Let's start with an easy one called CONTAINS. These interpretations follow a set of steps that are used by Tableau to distinguish and differentiate between the date and other fields. SUM (INT (CONTAINS ( [String],"substring"))) Option 1: Use FIXED to find the running count distinct. Tableau count if condition asked Jul 20, 2019 in BI by Vaibhav Ameta (17. This video shows you how to display that calculation and count the number of Welcome to DWBIADDA's Tableau scenarios tutorial for Beginners, as part of this lecture we will see,How to calculate a distinct count of a dimension in Tableau This given formula is calculated in Tableau after the data is retrieved from the initial query. This has the effect of canceling out the count of blank cells by making the numerator zero for associated counts. I rather tried to pull together a small library of 44 more complex formulas you may find useful when you have to work with strings in Tableau, like concatenate strings and a date, convert a string to a date, reverse words in a string, extract parts of a string, remove line feeds, check if a string contains a number, count the number of words in Tableau Deep Dives are a loose collection of mini-series designed to give you an in-depth look into various features of Tableau Software. I am trying to count a field if it is not null. To see this in action, connect to an Excel source, and then drag a dimension out using the RIGHT MOUSE BUTTON. The syntax of this Tableau CONTAINS Function is: CONTAINS(string, substring) The below Tableau contains statement checks whether the records present in the Department column contains I am trying to count a field if it is not null. A measure with an Aggregate Function property value of Distinct Count is called a distinct count measure. e. After clicking on Create calculates field option you will find a drop-down menu that contains a list of all tableau functions with their description and example. In most cases, when you drag a set to the viz, Tableau displays the set using the In/Out mode. Tableau Desktop: Count Distinct returns higher value than Count (if , If you use the DISTINCT keyword, the function returns the number of distinct values for the specified field. ) That will give you a bar chart by default. So, let's create a calculated field called customer group. Immediately available tools: Tableau Desktop & Server, SAS EG, Oracle, Knime. Tableau If Statement Example. The restriction on Tableau’s CASE statements makes it extremely difficult or impossible to use them to perform many logical calculations. To do this, we need to use the not equal to operator (<>). Short term potential tools: Preview of data table connected in Tableau. If it does, the function will return true. if-statement,contains,tableau. P-R-O-D name. The Tableau CONTAINS function returns True if the specified substring is present in the original string; otherwise, it returns false. And I know if more than 3 people work, it's almost guaranteed a work day (or at least should count as a workday) Rather than adding up value totals, Tableau lets you find how many of an item, and how many unique items, appear in a field. I love it for what it does, I hate it for those times that someone asks me to describe what it does. Tableau is the most popular interactive data visualization tool, nowadays. 2. In Tableau Desktop, connect to the Sample - Superstore saved data source, which comes with Tableau. Testing the logical scenarios of variables is a common task in data science and business intelligence. To demonstrate this Tableau If function, we need a Calculated Field. But if all you need is the grand totals to be 3 for December and 16 for January (i. The syntax of this Tableau CONTAINS Function is: CONTAINS(string, substring) The below Tableau contains statement checks whether the records present in the Department column contains . Tableau CONTAINS Function. COUNTD – Returns the distinct count (unique count) of all values in an expression. Support the Community and master Tableau. any repleis would be Tableau COUNT Function. In this video, learn how to count occurrences and distinct items. It is also, however, one of the more intensive calculations to perform and can be very slow Re: Count Distinct from Secondary workaround Ron Chipman Jun 18, 2019 5:25 PM ( in response to Greg Ganzel ) It works pretty well for visuals, like the one below, it which we can stack up all of the '1's into a bar chart. so something like count (distinct CandID further based on distinct date) thanks. Count Distinct function Returns the unique or distinct numeric count of records times Tableau will count source directly to return certain values based on In Tableau there exists the Think of it as something that can be collected counted or combined in some way to return a single value. But considering they may have the same name, so i cannot just count unique distinct values of Column A. Suppose you want to count all the cells that do not contain the name JOE, here is the formula that will do it: The formula will Sum the values in Column B if the cells of Column A contains the given text. And then drag the Fill Handle down to get all results. From the Data pane, drag Category to the Rows shelf and place it to the right of State. This allows us to determine if a certain condition is true or false (Boolean logic), thereby providing useful insights. To help Tableau rookies, we’re starting from square one with the Tableau Essentials blog series. Now the view will contain a continuous axis instead of column or row headers, and the field’s background will become green: Count (Distinct) is unavailable and Tableau shows the message Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube. Select Analysis > Create Calculated Field to create a calculated field; In the Calculated Field dialog box that opens, type a name for the field; In the formula field, create a calculated field similar to the following and then click OK: IF NOT ISNULL(SUM([<Field>])) THEN RUNNING_SUM(SUM([<Field>])) END Tableau Professional Answer The following instructions can be reviewed in the workbook attached below. In the Calculated Field dialog box that opens, do the following, and then click OK : Name the calculated field. More Information Aggregates are identified in Tableau by the prefix AGG when using them in Tableau. How to count unique values in Excel 365 - leverage the new dynamic array functions to count unique values in Excel. We write X ℓ to be the set of items with label ℓ. Count if cell contains text or part of text with the COUNTIF function. DATE – Returns the date from a string. Tableau creates a built-in measure that counts the number of times items such as product names or orders appear. First, let’s look at the problem that we’re solving for. The previous example uses a count aggregation of any non-null field to count a row in the “many” table of a one-to-many relationship. Distinct counts are critical to analytics, whether it's counting individual patients in a hospital, the number of unique retail transactions or the number of aeroplanes in a fleet. SELECT COUNT (DISTINCT item_num) FROM items; If the COUNT DISTINCT function encounters NULL values, it ignores them unless every value in the specified column is NULL. I have created a video tutorial an example here. I also do freelance work. Note that Tableau Calculations in Tableau are also aggregate functions. Using COUNT in Tableau to count observations by group. 1. 2 and later, the data model has the logical (semantic) layer and a physical layer. I've tried: IF CONTAINS(ATTR([Subject]), "List Email:") then ((COUNTD([Subject]))) Else COUNT([Subject]) END (That works only if the dimension is in the view) and. com Option 1: Use a calculation similar to the following to count how many times the substring occurs in any value of the dimension [String]. Tableau count rows where condition. . The CASE function in Tableau is employed to deal with conditional situations the result obtained from which is utilized based on the context and it affects the visual output. Enter a name, e. COUNT(DISTINCT quote/sell_date) WHERE COUNT (sales people on a given day) >3. 2 and later, a logical layer has been added in the data source. In Part 4 of our Tableau Deep Dive on level of detail, we’re going to examine the last of the three LOD calculation types – Fixed. twb contains instructions about how to interact with the data source. This is where the ability of Tableau’s IF statements to perform boolean algebra makes them far more useful than CASE statements. For example, to count cells in the range A2:A10 that contain the word "dress", use this formula: =COUNTIF(A2:A10, "dress") Or the one shown in the screenshot: Count if cell contains text (partial match) To count cells that contain a certain substring, use the COUNTIF function with the asterisk wildcard character (*). To help Tableau rookies, we’re starting from square one with the Tableau Essentials blog series. Because the count is distinct, if a member occurs multiple times, it is counted only once. The column 'DynamicCalc' should have the following values when Metric=A1 is selected: TRUE,TRUE,FALSE,FALSE,FALSE but in case B1 is selected it would be FALSE,FALSE,TRUE,TRUE,TRUE so basically I want to assign a value of TRUE to the DynamicColumn if there is at least one TRUE When we apply the COUNT function to a column, say customer ID, Tableau simply counts all the entries within this column. More In Tableau Server or Tableau Online you can only aggregate the members of the set into In/Out categories. Contains accepts a text field and checks to see if a specific substring exists within each row In this case, I am going to check if the string contains A10. For example, put Color in the Rows shelf and SUM(Number of Records) into Text, and you'll get a table with the counts for each Color. Create a calculated field called "Due Date Traffic Lights" to work out your days amount. One of the aggregate functions you can use in Tableau is Count (Distinct), which returns the number of unique values in a field. Notice that every order ID contains values for country (CA and US, for example), year (2011), and order number (100006). The below gives the date difference between the given date field and today: If we are using this many rows or columns to create a crosstab view, there is likely a better software available for the task or a better way to visualize the data in Tableau itself. Calculated Field: TOTAL : The COUNT DISTINCT function returns the number of unique values in the column or expression, as the following example shows. We’ve already aggregated the number of returns per Order ID with the MIN aggregation in the calculated field, but now I can also SUM up those number of returns. Each column can have the same or different value. IF [Status] = "COMPLETE" THEN COUNTD ( [Survey ID]) ELSE 0 END) But I am getting an error "Cannot mix aggregate and non-aggregate comparisons or results in IF expression". Out - The members that aren't part of Each data source in tableau which basically points to a database where records are stored can store data fields in a different way. COUNT (IF CONTAINS ( [String],"substring") THEN 1 END) Or alternatively. you’re data’s huge. Analysts require the ability to filter the data, create custom sets (for ad-hoc in/out analysis), and add custom calculations such as Count Distinct in Desktop, and publish interactive dashboards to Server that will update daily. If we’d like to pre-aggregate a unique count of users from a database that contains millions of users, it would be better to have the database count the users and return the pre-aggregated values. From the Data pane, drag Sales to the Columns shelf. using if statements in tableau on a contains function. I've tried: IF CONTAINS(ATTR([Subject]), "List Email:") then ((COUNTD([Subject]))) Else COUNT([Subject]) END and CASE CONTAINS(ATTR([Subject]), "List Email:") Goal: For a dimension, count the distinct numbers of records if the string has "List Email", otherwise count all records. The Tableau CONTAINS function returns True if the specified substring is present in the original string; otherwise, it returns false. Support the Community and master Tableau. COUNT(IIF(NOT CONTAINS([Subject],"List Email"),[Subject],NULL)) For each User and Month, count distinct emails that contain List Email and add to that all emails that don't contain List Email. I want to do this because on holidays, off days and weekends - it's basically guaranteed that fewer than 3 people will work. The series is intended to be an easy-to-read reference on the basics of using Tableau Software, particularly Tableau Desktop 8. [field1] AS [field1] FROM [table] all one one line and it would work just fine. This calculation is slow as compared to the one mentioned below CONTAINS ([PRODUCT NAME], [PRODUCT LOOKUP]) A better way to do this would be to use the specific CONTAINS function as this will be converted into optimal SQL when passed to the database. Note: this method will not work to find a moving distinct count. Here are some alternatives to using count distinct function. Tableau count number of times same value , 1 Answer. Assuming that your big_city, small_city calculation is a calculated field named City_Size Now, the First Calculated field will assign a 1 or 0 to each row, depeding upon the value of City_Size. The asterisk (*) is a visual indicator of a special type of Null value it occurs when there are multiple values. Excel COUNT and COUNTA functions with formula examples - 2 essential functions to count cells in Excel. COUNT – Returns the count of all values in an expression. People without a license to Tableau Server or Tableau Desktop can also access packaged workbooks using Tableau Reader. This is a snapshot of the data pulled into Tableau: Success Count is defined as if [Task Status Cal]="Success" then [Wo_ID] The formula for [Success Count] was: IF [Task Status Cal] = "Success" then STR([Wo Id]) end Tableau considered this formula to be valid. 2. So it'll be C-O-U-N-T D, so that's count distinct. In this example the view contains [Order ID] and [Product Name] on rows, and the goal is to count orders that contain the product "Staple holder. How to get bar chart with distinct count based on a column in tableau? 1. " Create a calculated field with a name like "# of Orders with a Staple holder" with a calculation similar to the following: { FIXED [Order ID] : MAX(IF [Product Name] = "Staple holder" THEN 1 ELSE 0 END)} The goal is for a dimension (Subject in the workbook), count the number of distinct records if the string contains "List Email", otherwise count all records. • Everyone, fundamental building block to understanding Tableau • Tableau Operates as a SQL Aggregation Engine • Instructing Tableau How to Roll Up Data • Operate at the Row Level then Add Up Fall Down When • You need Logic • More than a Single Column of Data ([Col1] + [Col2] / [Col3]) • Need to do Calculations to answer Deeper The octet is a unit of digital information in computing and telecommunications that consists of eight bits. CONTAINS – Checks if a string contains a certain set of characters (does “dog” contain “og”). g Hi, new to Tableau and I'm stuck. Now we can move on to each of the four formulae reflecting the logical combinations between the search phrases. The fields are imported to the tableau as a text string or numerical value. In Datameer Spotlight, you will access the data for Tableau dashboards like you never could before, including Facebook Ads, Workday, Twitter Ads, Hubspot, Shopify, Dynamics, SAP Concur, and so much more. count distinct , summarize , table calc , tableau , total 11 comments UPDATE (7 Sept 2016): There is now a much easier way to do this with LOD expressions. A distinct count measure can be used to count occurrences of a dimension's lowest-level members in the fact table. , count distinct subject regardless of the user), then LOD Then place COUNTD(Col2) in the Rows shelf & then right click it and select Measure / Count (Distinct). You can try that with an approach involving two calculated fields. We will be learning how to create a "distinct count" calculated field in Tableau. 1 and 8. Each logical table contains physical tables in a physical layer. This is shown in the image below. Consider a data set that includes 10,000 records with 20 different regions. As usual, the example is based on the Superstore Sales data set, shipped with Tableau Desktop. In Tableau 2020. You can count numbers, dates, booleans, and strings. •A pointwise count distinct query takes a label ℓ and returns the number n ℓ of distinct items with label ℓ. …If you sell solar and wind energy products for example,…you could have multiple product categories, each of which…contain several products. Tableau count distinct [Tableau Functions] An Overview Of Tableau Aggregate Functions , Hi Jehan,. So I'll change the name from calculation one to distinct products, then I'll click in the editing area below that and I need to use the count D function. Here is the actual text from their website: COUNTD(expression) Returns the number of distinct items in a group. tableau count distinct if contains