Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Sequential Numbering of Groups

Chitowndivaus
7 - Meteor

Good Evening...

 

I'm trying to give a group of data a specific number.  For instance:

 

Record ID   Ownership   Del Pt      Name                      Address                      State    Store #

       1                 20        12345678  Ben's Candy Barn   1 Horseshoe Lake        ON         1

       2             1220        12345678  Ben's Candy Barn   1 Horseshoe Lake        ON         1

       3               890            220789  Ben's Candy Barn   1 Horseshoe Lake        ON         1

       4             1220        12376789  Ben's Candy Barn   1 Promenade Dr           MB         2

       5               890            220899  Bens Candy Barn    1 Promenade Dr           MB         2

       6                20         12376789  Ben's Candy Barn    1 Promenade Dr           MB        2

 

In other words, if the next address and state below are the same, give it the same number as the one number above, if not give it the next sequential number.

 

I used the Record ID tool to give it the record number.  I think I can accomplish this by grouping and using the Multi-Row tool, but I think I've tried so many things, I've totally confused myself.  Is this even possible?  If so, how do you even get it started?  Among others, I've tried:

 

If [address_line_1] and [state] !=[address_line_1] and [state] then
[Record ID] else [Row+1: Record Id]
end if

 

I'm confused!  Any help would be greatly appreciated.

 

Thanks.

 

YT

3 REPLIES 3
summarizer
9 - Comet

Hi there.  One of my favorite tools which you can use here is the Tile tool.  I kind of abbreviated your data set.  I often play with the parameters in the Tile tool.  I used the drop down to select "Unique"  for your address and state.  You can also try grouping by fields too if needed, but I didn't in this case.  I just listed that your address and state would need to be unique.  You get not only a 1 for the first set of addresses and a 2 for the next, but you also get a sequence within that set (1,2,3).  You can rename them with a Select.  Hope that helps.

tile.jpg

Chitowndivaus
7 - Meteor

Thank you, thank you, thank you!!

 

I've only been trying to figure this out for 4 days!  LOL!!

summarizer
9 - Comet

We've all been there... trust me. And there are often more ways than one to get to your answer, but the Tile tool "unique" feature is my fave.

Labels