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
8,293 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 9, 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 ffdfd
• 5,550 points
2,588 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
1,163 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 12, 2018 in Tableau by xyz
• 1,560 points
6,619 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 21, 2018 in Tableau by ffdfd
• 5,550 points
6,194 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
9,391 views
+2 votes
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
1,277 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 6, 2018 in Tableau by Atul
• 10,240 points
5,205 views
0 votes
1 answer

How can I remove { } from columns in Tableau?

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

answered Aug 10, 2018 in Tableau by Atul
• 10,240 points
655 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP