Alteryx Designer Desktop Discussions

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

Help needed on subgroup counting

SVIGGIANO
6 - Meteoroid

I need some help on subgroup counting for some work that I have to do;  I have subgroups that I will illistrate as alpha characters.  Some will repeat once and others more than once and I need a variable that counts the elements of the subgroup in the order they appear.  I thought the multirow formula might work but I cannot get it to work for me.  Here is an example of the counter I need:

 

Subgroup Needed Counter

A                   1

A                   2

B                  1  (New subgroup resets the counter)

C                  1  (New subgroup resets the counter)

C                  2

C                  3

C                  4

 

If there is anyone out there who can help me, it would be greatly appreciated.  Thanking this group in advance as you guys have helped me with my simple requests before.

C

5 REPLIES 5
atcodedog05
22 - Nova
22 - Nova

Hi @SVIGGIANO 

 

You use tile tool on unique value config on your required column.

atcodedog05_0-1605375872980.png

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-Tile/ta-p/30235

 

Example

atcodedog05_0-1605375684974.png

Or Multi-row formula tool like below

atcodedog05_0-1605376001355.png

 

 

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

PhilipMannering
16 - Nebula
16 - Nebula

You can also use the multi-row tool,

Use the expression [row-1:Counter] + 1

And then tick to Group By Subgroup.

 

PhilipMannering_0-1605375726954.png

 

 

Easy peasy

 

 

reply_mueller
8 - Asteroid

Hey @SVIGGIANO ,

 

you're right, that this is a problem where the Multi-Row-Formula can help you.

See this workflow (RecordID added for proof, that the columns are not mixed up in their order by using "Group by" - not needed)

reply_mueller_1-1605375681636.png

With the following configuration of the Multi-Row Formula:

reply_mueller_0-1605375649471.png

And the Result:

reply_mueller_2-1605375781532.png

 

Happy Alteryxing.

 

Best,

Johannes (Blue Reply)

SVIGGIANO
6 - Meteoroid

Great solutions all!  Thank you very much.  This got me out of a jam today as I prepare for Monday.  I am new to the Alteryx Community and you folks make it too good to be true.

atcodedog05
22 - Nova
22 - Nova

Hi @SVIGGIANO 

 

If the solution posts were helpful please encourage the solution authors for there helpful response by marking there post as solution.

And you are allowed to mark multiple post as solution so feel free to mark all posts that helped you as solution.

 

Happy to help 🙂

 

Cheers and Happy Analyzing 😀

Labels