Alteryx Designer Desktop Discussions

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

Mutli row formula or Batch macro

Shank
8 - Asteroid

Dear All,

 

I am facing some challenge to concatenate rows based on the column id can some one help on how can we achieve this?

 

below is the scenario.

 

Example: I have a part 1 which goes from line 2022 - 2060 and from 2060 - 1692 (But i have this information in two different columns). I need an output to show line information in one row like 2022-2060-1692 for part 1. can anyone help us on this?

 

General example to understand the concept:- in order to reach location C from location A. I have to travel location A to B first then from B to C

 

A-B-C

 

Input: 

PartLine fromLine To
120222060
120601692
218492022
218421849
316921699
316992022
320222025

 

Expected Output:

PartLine Info
12022-2060-1692
21842-1849-2022
31692-1699-2022-2025

 

Best Regards,

Shashank

11 REPLIES 11
IraWatt
17 - Castor
17 - Castor

Hey @Shank,

You can use a multi row formula and summary tool like this to achieve this (workflow attached below):

IraWatt_0-1651580321577.png

If you have any questions on how this works make sure to ask :)

HTH,

Ira

mceleavey
17 - Castor
17 - Castor

@Shank ,

 

Isn't this a question on one of the exams?

 

naughty.gif



Bulien

Shank
8 - Asteroid

@mceleavey 

 

Nothing as such! I was just trying to solve but I could not achieve it. so thought of posting it in the forum, so that I can learn something out of it :) .

 

Thanks for your feedback :)

Shank
8 - Asteroid

@IraWatt Thanks for helping me on this one.

 

I have one concern here for part 2, with the logic that you have used output achieved is 1849-2022-1842-1849.

 

but i actually need this 1842-1849-2022. 

IraWatt
17 - Castor
17 - Castor

Hey @Shank,

What logic is that following? Part one of journey two is 1849->2022 then part two is 1842->1849. If we are removing duplicates would it not be 1849-2022-1842 ?

IraWatt
17 - Castor
17 - Castor

@mceleavey trying to call people out XD

Shank
8 - Asteroid

Just to give simple example

 

i have to create a transportation line to reach final destination.  the ultimate goal of part 2 is to reach 2022 but this can happen only by travelling from 1842 to 1849 then from 1849 to 2022.

in above case 1849 is the common.

therefore output should be 1842-1849-2022

 

hope this helps!

Shank
8 - Asteroid

@IraWatt 

 

Just to give simple example

 

i have to create a transportation line to reach final destination.  the ultimate goal of part 2 is to reach 2022 but this can happen only by travelling from 1842 to 1849 then from 1849 to 2022.

in above case 1849 is the common.

therefore output should be 1842-1849-2022

 

hope this helps!

IraWatt
17 - Castor
17 - Castor

@Shank how do you know from looking at the table that 2022 is the end goal? The other examples are ordered from left to right the move down, the end goal is always in the right cell of the last part of the journey.  

Labels