Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

How to have add a counter for duplicates in a table

apaicanada
7 - Meteor

Hi all,

 

I have a set of duplicates in this table and am wondering how to create a counter which starts at 1 and then counts up for every duplicate of "File #" found. For example, my table looks like this:

 

File #CodeReg hours

117521

1530
1424200235
1424201035
1524120235
1524121040
1524121540

 

And I would like a counter that outputs something like this: 

 

File #CodeReg hoursCounter

117521

15301
14242002351
14242010352
15241202351
15241210402
15241215403

 

I tried using the multi row formula tool with "IF [Row+1:File #] = [File #] THEN 2 ELSE [ROW-1:Counter]+1 ENDIF" but it isn't really working and doesn't count past 2.

 

Any help at all is appreciated!

 

Thanks so much,

Akarsh

1 REPLY 1
Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @apaicanada,

 

You're right, this would be a simple multi row formula, all you would need to do is group on File # and ensure the "Values for rows that don't exist" drop down is set to "0 or Empty". The formula would be [Row-1:Counter] + 1

 

My configuration of the multi row formula is below:

image.png

 

The workflow looks like:

 

image.png

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.

 

Regards,

Jonathan

Labels