2 Replies Latest reply on Apr 26, 2018 7:18 PM by Tanzir Ahmed

# Distribution/bins from a single column

Experts,

I'm after some guide around distribution/bin.

Basically, I have a list of student ID's in one column and would like to do the followings -

1. Count how many times student id's are repeated.

2. Then group them how many id's repeated once, 2-3 , 4+

3. Do a bar graph to show the grouping.

This is the source:

 Student_id 123 123 343 654 322 343 123 789 987 789 789 789 789

I can do unique count -

 Student ID Unique Count 123 3 343 2 654 1 322 1 789 5 987 1

I want to group the count under the

group

1 :  3 records

2- 3 :  2 records

4+ : 1

Lastly, I'd like to plot them in a bar graph like bIns.

Any thoughts?

• ###### 1. Re: Distribution/bins from a single column

You can use LODs for this. Create a calculated field to count the number of student id occurences:

{FIXED [StudentId]:COUNT([StudentId])}

You can drag that field to dimensions and use it as a dimension. You can also group it, something like:

IF [Above Calc] = 1 THEN '1'

ELSEIF [Above Calc] < 4 THEN '2-3'

ELSE '4+'

END

That should give you what you need to create a bar graph

1 of 1 people found this helpful
• ###### 2. Re: Distribution/bins from a single column

Thanks Andrew!

Exactly what I was after.

Cheers,