Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Output to Multiple CSV Files with Updated Formulas

amazz24
7 - Meteor

Hello,

 

I saw multiple posts regarding outputting files to CSV to show formulas when opening with Excel.  However, I am trying to also separate my output into multiple CSV files and I am finding that the formulas in the separate files are no longer working as they relate to RecordIDs that were in the original combined file.  Does anyone know how to ensure that the formulas reference the correct rows in each separate file?

 

Thank you!

4 REPLIES 4
DiganP
Alteryx Alumni (Retired)

@amazz24 You can use the 'take file/table name from field' option to create separate excel sheets.

DiganP_0-1578441031524.png

Here's an article that walks you through this functionality. 

Digan
Alteryx
amazz24
7 - Meteor

Thanks - I know how to break out the files by a specific field in my data.  However, I am using a CSV output so that I can see the formulas in my output.  The cell references in the output are not updating based on their position in the new separate output files.  For instance, please find the attached document that further explains my issue.  In the attached file, I have 4 tabs - the first is a combined dataset and the other 3 are as if I used the "take from file/table name from field" function in the output.  When I use this function, the formulas in the 3 tabs do not update for the new row positions, and so I will need to go into each separate file and update the formulas manually.  I am hoping there is a way to do this within the software, as I will have 100+ files of data that will need to be updated the same way.

lmorrell
11 - Bolide

Hi @amazz24 

 

Workflow is attached

 

Output to Multiple CSV Files with Updated Formulas.png

 

This scenario seems like a great use case for the Tile Tool. If I understand your problem, you are outputting .csv files to be opened in Excel where the formulas will be calculated (as in this blog post by @MattD) - however, at writeout the formulas are incorrect as the original Record ID does not reflect the eventual cell number when batched through the Output Tool.

 

In order to make our workflow match the intended output, we can calculate a Sequence ID for each Name via the Tile Tool's  'Unique Value' option. Each name will be assigned an integer, and each row within each unique integer will have a sequence ID matching the row order of the Dataset - resulting in what will become the Record ID in the batched .csv files. By adding one to the Sequence ID and then referencing that to construct the "Multiplication" column we can achieve the desired output.

 

Hope this helps!

amazz24
7 - Meteor

Thank you @Imorrell - It appears to be working out for my dataset!

Labels