Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

How to join two tables containing data?

sylwestro
5 - Atom

Hi,
I have a problem with one of workflows I built (attached).
I have a set of the data I split into header and data. The header is formatted to have the proper colors, fonts, etc. and I want to join header and data into one table which is finally split into separate files upon company codes from column C and saved to the location.
Whatever I do these two pieces of data (table with headers and table with data) do not match. Would you be able to support?
Also, I would like to add to every single output file separate tab with table for sign off of the data. How to do that (so final files contains one sheet with data and one sheet with sign-off form).

Desired outcome is in attached Template.xlsx, data file attached as Masterfile final.xlsx and workflow also attached.
Thanks in advance!

5 REPLIES 5
DataNath
17 - Castor

In terms of the first requirement, I believe this is what you were looking for? Was just a case of unioning the data before putting it into a table, rather than trying to stack the two tables.

 

DataNath_0-1652775827590.png

 

In terms of the second requirement, you can just add the sign-off form as another input and then output that to the same file, using a different sheet name so it doesn't overwrite the other.

 

sylwestro
5 - Atom

Hi DataNath,

 

Many thanks for your comment.

I was thinking about such solution for 1., however now formatting is lost. Is there any way to keep the formatting or apply it after unironing the tables (to headers only)?

Also, how to get rid of additional "Field no" entries from the header?

 

Thanks!

DataNath
17 - Castor

You could do this by editing the header settings here:

 

DataNath_2-1652776810746.png

 

 

And then also using the same formatting in a row rule, where the row # = 1, like so:

 

DataNath_1-1652776771083.png

 

Which would give you the following:

 

DataNath_3-1652776836765.png

 

Obviously I've just used a yellow background to show it working here, but you can add your formatting as you wish.

 

To get rid of the 'Field X' names, I just renamed all of the headers with a space, like so:

 

DataNath_0-1652777141742.png

 

sylwestro
5 - Atom

Hi DataNath,

We are almost there.

What I am looking for is to have first two rows as a header to be added to the report and the reports are saved to separate files upon the grouping from 3rd column.

So basically this shall be the header:

 

sylwestro_1-1652886204081.png

 

 

These are the data grouped by 3rd column:

sylwestro_2-1652886220011.png

 

At the end the hedaer shall be visible at every record change:

sylwestro_3-1652886362250.png

 

And finally I'd like to save the outcomes (header+data) to separate Excel files.

DataNath
17 - Castor

Hey @sylwestro in this case, I'd say the best option is to run this as a batch macro. The groups from your 3rd row would be what you feed into the upside down question mark, which then updates your control parameter. What this will do is run each group through the macro one at a time, outputting them as separate files. In order to not overwrite, you'll need to make a filename dynamically for each of the groups. There's a good thread on how to do that here, you would just use your grouping where they have used region:

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Dynamic-output-filename/td-p/911070

Labels