Alteryx Designer Desktop Discussions

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

Multi-row formula

mazeem
6 - Meteoroid

Hi I need help creating a workflow in Alterxy for the attached data file. I received this report every week for billing. So i want to create a workflow where I insert the file and it automatically generate as shown in the pic. I'm trying to assign each client name and want the final output to look like this with each tab has client name with their billing info. First I took out the "Total" rows using the formula: IF Contains([Emp Name], 'Total') THEN Left([Emp Name]) ELSE "" ENDIF in to a new column named "Primary ID" just for now. then im trying to use multirow formula to assign each client name and code to each of the employees above, but formula (IF IsEmpty([Primary ID]) THEN [Row+1:Primary ID] ELSE [Primary ID] ENDIF)  is not working for me as it's only assigning 1 row on top, but I was to assign to each of the employees name above.

 

mazeem_0-1647457821885.png

 

6 REPLIES 6
FreeRangeDingo
11 - Bolide
11 - Bolide

You are going to need to separate out the Company name and partner name, which you can do with some creative formulas if the text is consistent, which it doesn't appear to be.  

 

For example, you have ...

 

Total(2) Client Code: 10045-000, Kelly Brook LLC; Partner Assigned: Steven, Robert; New York, NY

Total(6) Client Code: 35017-0001, Pet Care LLC Partner Assigned: Steven, Robert; New York, NY

 

In the first example, the company and the partner assigned are separated by a semi colon but in the second example there is only a space.  Is it possible to make this consistent?

 

My first crack at getting the company produced the following result, which is correct for the first 2 but no tthe second because of the inconsistency in punctuation.  

 

FreeRangeDingo_0-1647459701222.png

I wasn't even using multi row formulas.  I just started with a record ID (to put them in the right order again later) and then separated the total records, performed calculations and unioned back together.  

 

FreeRangeDingo_1-1647459755774.png

 

 

 

 

FreeRangeDingo
11 - Bolide
11 - Bolide

You might also be able to split to colums using the Text to Columns tool and get an easier solution if the punctation is consistent.  

 

FreeRangeDingo_0-1647460014138.png

 

mazeem
6 - Meteoroid

Hi Dingo,

 

Use the updated file. I've updated the punctuation part and it's consistent now. Can you please attach your workflow? I would like to see what exactly you did to come with a final output.

 

mazeem_0-1647460609461.png

 

binuacs
21 - Polaris

@mazeem 

binuacs_0-1647465775566.png

 

FreeRangeDingo
11 - Bolide
11 - Bolide

Just FYI, you have a duplicate client code.  You have 35017-000 for Pet Care LLC and Hard Rock LLC

FreeRangeDingo
11 - Bolide
11 - Bolide

Here is what the output looks like.  Workflow attached.

FreeRangeDingo_0-1647473836533.png

 

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels