Free Trial

Alteryx Designer Desktop Discussions

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

Counting only rows with a 1

Deano478
12 - Quasar

Hey All,

 

I have a the below Dummy data set and what I need to do is only get a count of the rows per name that contain a 1 so if there is a 0 we don't care about it essentially.

 

so like in the case of Dean it should just be a count of 3 and so on.

 

This might be a simple task but I cant see  way to do it after trying various approaches already.

 

Sample data:

 

NamePresent_or_NotYear
Dean12023
Dean12023
Dean12023
Dean02023
Dean02023
James12023
James12023
James02023
Liam02023
Liam02023
Liam12023
Liam12023
Liam12023
Liam02023
Liam02023

 

Cheers to you all in advance.

5 REPLIES 5
FinnCharlton
13 - Pulsar

Hi @Deano478 , you can do this by filtering to just the '1's and then counting the rows:

FinnCharlton_0-1678793316202.png

Another approach could be to replace the 0s with NULLs and then use the "Count Non Null" functionality of the summarize tool. Hope this helps!

binuacs
21 - Polaris

@Deano478 One way of doing this with the summarise tool after changing the 0's to NULL value

 

binuacs_0-1678793342508.png

 

ShankerV
17 - Castor

Hi @Deano478 

 

One way of doing this.

 

ShankerV_0-1678793446849.png

 

BS_THE_ANALYST
14 - Magnetar
14 - Magnetar

@Deano478 here's one way using the Summarize tool:

BS_THE_ANALYST_0-1678793466573.png

 

 

All the best,
BS

LinkedIN

Bulien
Deano478
12 - Quasar

WOW I appreciate all the responses guys I was really overthinking it I'll give all the various approaches a go as they may all be useful going forward

Labels
Top Solution Authors