Alteryx Designer Desktop Discussions

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

Insert row as per column reference

Lalaiah
8 - Asteroid

Hi Team,

 

I have data need to insert row as per duplicate records. Example  "b" having 2 records so i need row to be insert a between "b" and "d".

given sample out put. (if inserted 2 rows also that will be more help full)

 

Coloumn nameDuplicate
a1
b2
b2
d3
d3
d3
e2
e2
  
Out Put 
Coloumn nameDuplicate count
a1
  
b2
b2
  
d3
d3
d3
  
e2
e2
5 REPLIES 5
binuacs
20 - Arcturus

@Lalaiah One way of doing this

 

binuacs_0-1667384177557.png

 

DataNath
17 - Castor

Hey @Lalaiah, when you say 2 rows in between would be better, does this mean you're looking for N rows between records, where N is the count of column name? That's what I've gone for in my approach so apologies if not, but the workflow here performs a count, generates that many rows and then integrates them back into the main dataset:

 

DataNath_0-1667384420184.png

grazitti_sapna
17 - Castor

@Lalaiah , Please find the below solution if you are expecting null rows on the basis of number of entries for each id in column name field.

 

grazitti_sapna_0-1667387308035.png

 

Sapna Gupta
KrishnaChithrathil
11 - Bolide

you can also try this way.

KrishnaChithrathil_0-1667388747579.png

 

Felipe_Ribeir0
16 - Nebula

Hi @Lalaiah 

 

Another of doing this (for 1 null row - first container or 2 null rows - second container):

 

If necessary, you can configure the second container to any value of null rows inside the Generate Rows tool.

 

Felipe_Ribeir0_0-1667395194248.png

 

 

Labels