Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Counting rows with same values in other columns

bbaisil
7 - Meteor

Hi,

 

I have a question. My data looks like something below

 

Id    Grade

1       A

1       A

1       B

1       C

2       C

2       D

2       A

2       U

3       U

3       U

3       U

3       U

4        A

4       B

4       U

4       A

5       U

5       U

5       U

5       U

6       A

6       A

7       A

7       U

7       B

8       A

8       A

8       A

 

These are the grades achieved for different units by  students(id). I have around 90K records. I want to know the students who got U in all units. Can anyone help ?

6 REPLIES 6
IraWatt
17 - Castor
17 - Castor

Hey @bbaisil,

I assume as there isnt a units column you are looking for people with 4 U grades. Here is one way to do this:

Gif2.gif

In the summarize tool I grouped by student ID and Grade then counted. 

 

In the filter I used a formula the community has some quick and easy videos on formulas https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Writing%20... 

 

Any questions or issues please ask :)
HTH!
Ira

Amol_Telore
11 - Bolide

Hey @bbaisil 

 

Another way of doing this, similar to @irawatt solution.

 

Amol_Telore_0-1658488462771.png

 

bbaisil
7 - Meteor

Hi, Number of units are not always 4. there are some students who only have 3 or 2 units enrolled in my data sets.

Units column is also available if that helps.

IraWatt
17 - Castor
17 - Castor

@bbaisil, I updated my workflow:

IraWatt_0-1658490836739.png

I hope the annotations make sense. I count how many grades each student has to find out how many units the enrolled on.

 

Kinga
8 - Asteroid

Hi @bbaisil ,

 

I've added student 6 (with three U only) and student 7 (with one A and two U), just to check, if it is working.

I've add too summarize tools: one to check how many units has each student (grouping only by id) and second grouping by id  and grade. If count of "U" for this student in second tool equals to count of all student units, then this student has only "U" grades. 

Untitled.png

 

bbaisil
7 - Meteor

Hi, Thank you both.

It worked now

Labels