Alteryx Designer Desktop Discussions

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

add new field

gvishal9
6 - Meteoroid

i have 4410 restaurant names . I want to break this down into rows and columns matrix so that i can visualise it properly. How can i add a new field named "Row Number " that has a list from "1-440" and another field column number that has "1-10" . 

 

so it should be as follows:

 

Row_no Column_No Rest_name 

1               1                 abc

1               2                 agb

1               3                 vtf

1               4                 xyz

2               1                 gft

2               2                 lft

...........

..........

.....

3 REPLIES 3
KaneG
Alteryx Alumni (Retired)

Hi @gvishal9,

 

Different people would choose different methods but a couple of ways:

 

One way will be a

  • RecordID with the column called Row_Number followed by
  • a formula tool: CEIL([Row_Number]/10)
  • then a multi-row formula grouped on Row_Number to create Col_Number: [Row-1:Col_Number] 

Another way is a couple of Multi-row formula Tools. (Set unknown rows to 0). First create

  • Col_Number: IIF([Row-1:Col_Number]==10,1,[Row-1:Col_Number]+1)
  • Then create Row_Number: IIF([Row-1:Col_Number]==10 || [Row-1:Col_Number]==0,[Row-1:Row_Number]+1,[Row-1:Row_Number])

 

 

Kane

gvishal9
6 - Meteoroid

Thanks kane. It works . 

 

RodL
Alteryx Alumni (Retired)

And in the spirit of showing there are always different ways of finding the solution in Alteryx, you could use the RecordID tool first and then the Tile tool set to "Equal Records" with 10 Tiles. (Of course you would get an extra column that you would want to eliminate at some point.) Smiley Wink

Labels