Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Re-ordering and repeating fields based on a column layout input

Carluccio555
9 - Comet

Per the below screenshot:

 

Input 1: some quarterly and full year financial data 

Input 2: The headings of a report 

Desired Output: The data reordered and some columns repeated, with blank columns for spacing, basically a reporting layout. 

 

Carluccio555_0-1670743348346.png

 

I tried using a union tool but the columns get reordered and it wont duplicate columns.  In reality there's going to be too many columns so I cant do a Select, the fields need to be based on input 2.

 

Thanks

 

4 REPLIES 4
PanPP
Alteryx Alumni (Retired)

Hi @Carluccio555 

 

I provided a sample WF. You can use a render tool to output the table in a PDF format or excel format. 

 

I hope this helps.

 

If you have any other questions, please let us know. 

Carluccio555
9 - Comet

Thanks but the above is just an example of what I'm trying to achieve. In reality input 1 has around 500 fields and the layout of the reporting columns (input 2) is about 160 fields. As stated these can be repeated fields or even be empty columns. I can't be using Select or manually configuring the order due to how many columns there will be in the report.  Also your solution does not address repeated columns or empty columns.

 

The key point is that I want to be able to easily re-arrange and if necessary repeat columns by only changing the input 2 (which are column headings that layout the report).

 

 

grazitti_sapna
17 - Castor

@Carluccio555 , you can easily achieve this by using Union tool and taking 1st input the one which has headers only. If you header row is part of records then you need to use dynamic rename tool and pick the header from 1st record and then use union.

 

grazitti_sapna_0-1670823306287.png

 

Sapna Gupta
Christina_H
14 - Magnetar

Here's my solution, transposing the data and joining to achieve the repeats.  I've kept the headings as the first row of data to avoid name clashes - this can be resolved when you export, e.g. skip field names when exporting to Excel.

 

Christina_H_0-1670852141102.png

 

Labels