Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Data Science by (19k points)

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?

1 Answer

0 votes
by (33.1k points)

First, add Col1 to the Columns shelf.

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

This will give you a bar chart by default.

For a table, place COUNTD(Col2) into the Text shelf instead.

Hope this answer helps you!

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

29.3k questions

30.6k answers

501 comments

104k users

Browse Categories

...