How can I use COUNTD function in Tableau?

0 votes

Sample Data:

Col1 Col2
A   x
A   x
A   y
B   x
C   z

What I want?

I just want to represent the (Col1) on a graph in the X-axis to the unique references of the data(Col2) on the Y axis

I need something similar like, A (2) ; B (1) ; C (1).

Can someone tell me how can I use COUNTD function in this case?

May 8, 2018 in Tableau by geek
601 views

1 answer to this question.

0 votes

First add Col1 to the Columns shelf.

Then place COUNTD(Col2) in the Rows shelf & then right click it and select Measure / Count (Distinct).)

That will give you a bar chart by default.

Just in case if you have a table, place COUNTD(Col2) into the Text shelf instead.

answered May 8, 2018 by Atul
• 10,240 points

Related Questions In Tableau

0 votes
1 answer

How can I use Tableau to create a heatmap?

Step 1: Create an Excel Spreadsheet with ...READ MORE

answered Apr 2, 2018 in Tableau by Atul
• 5,530 points
616 views
0 votes
0 answers

How can I sort date field in presence of another date field in Tableau?

Goal: Sort the new ship date in ...READ MORE

Apr 10, 2018 in Tableau by ghost
• 1,790 points
129 views
0 votes
1 answer

How can I calculate the median of sales price using 3 variables in Tableau

First let me clarify things for you. ...READ MORE

answered Apr 11, 2018 in Tableau by xyz
• 1,550 points
642 views
0 votes
1 answer

How can I add legends to worksheet in Tableau?

Just add the worksheet on the dashboard ...READ MORE

answered Apr 20, 2018 in Tableau by Atul
• 5,530 points
209 views
0 votes
1 answer

How to color code cells of a column based on the text value in Tableau

You can use the following steps to ...READ MORE

answered Mar 27, 2018 in Tableau by Atul
• 10,240 points
1,815 views
+1 vote
1 answer
0 votes
1 answer

Calculated filed with if-then

Below is the required code:  IF (NOT ISNULL([test2])) ...READ MORE

answered Mar 27, 2018 in Tableau by Atul
• 10,240 points
77 views
+2 votes
1 answer
0 votes
1 answer

How can I count the aggregate function in Tableau

Create two calculated fields one for 100's ...READ MORE

answered Apr 5, 2018 in Tableau by Atul
• 10,240 points
1,594 views
0 votes
1 answer

How can I remove { } from columns in Tableau?

Create the following calculated field and use ...READ MORE

answered Aug 9, 2018 in Tableau by Atul
• 10,240 points
55 views