community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Subtotal counting records

Meteoroid

I have need to produce column R in a dataset that only has the first 3 columns.  I need a running count of distinct records of studentid, feeid, and transactionid.  The first one is 1, second is 2, etc.

 

This is easy in Oracle (in fact, the other half of this dataset is coming from Oracle), but it is MySQL.  That means I need to compute it in Alteryx here.

 

How can I add this 4th column to the dataset?  I can get the total count of each just fine, but counting up from 1..N is where I'm getting stuck.

 

studentidfeeidtransactionidR
A11234567891
A21234567891
A31234567891
A31234567892
B19876543211
B29876543211
B29876543212
B29876543213
Alteryx Certified Partner
Alteryx Certified Partner

@alarsen,

 

I used a multi-row formula.  Please take a look at my workflow as I think that it solves your problem.

 

Capture.png

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Meteoroid

@MarqueeCrew Ah!  I was so close.  That's working great...thank you so much!

Alteryx Certified Partner
Alteryx Certified Partner

@alarsen,

 

You're quite welcome.  Sometimes it helps to just ask for help and things become so clear.

 

:)

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Asteroid

I am trying to get the expression to return just a count of the number of times a record occurs such as below but don't know the syntax of the Alteryx expression:

 

IDCount
A2
A2
B1
C4
C4
C4
C4
Asteroid

@JMoore You can use a summarize tool and take a sum of all the values, grouped by the ID column. Will post the workflow once i have access to the tool. 

Asteroid

@amarendra the summarize tool does not let me investigate the records in place or show the new column unfortunately.

Highlighted
Asteroid

@JMoore Please check the solution attached. I could replicate what you wanted, but you will have to check if that would work in your context. 

Asteroid

@Amarendra thanks for that and sorry for the extremely slow response

Labels