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.
studentid | feeid | transactionid | R |
A | 1 | 123456789 | 1 |
A | 2 | 123456789 | 1 |
A | 3 | 123456789 | 1 |
A | 3 | 123456789 | 2 |
B | 1 | 987654321 | 1 |
B | 2 | 987654321 | 1 |
B | 2 | 987654321 | 2 |
B | 2 | 987654321 | 3 |
Solved! Go to Solution.
@MarqueeCrew Ah! I was so close. That's working great...thank you so much!
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:
ID | Count |
A | 2 |
A | 2 |
B | 1 |
C | 4 |
C | 4 |
C | 4 |
C | 4 |
@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.
@amarendra the summarize tool does not let me investigate the records in place or show the new column unfortunately.
@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.
@Amarendra thanks for that and sorry for the extremely slow response