This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I'm an alteryx beginner. I'm facing a problem with renaming my headers.
Consider this sample excel report layout-
I am trying to get the header name for my data but the issues I'm facing are-
Header names are given in 2 different rows instead of first row only. Wherever the header name in given in the second row, the respective column is blank in first row and vice versa (as seen in the sample data above)
Not all columns are present every time and the order of columns keeps changing, due to this i can't use a text input with header names for dynamic rename as then columns get renamed incorrectly.
If I just let dynamic rename tool name the columns on the basis of the first row then the columns with their header name in second row get renamed randomly like (Field_SomeRandomNumber) as they were blank. This random header name keeps changing everytime time i update input file with a new report so it is problematic as i need to use filter/formula tool on some of these columns and since its random and changes every time, i run into issue with target names.
Please suggest a solution.
In the attached workflow. Please look at the "Beginning Debt Check" container. I'm comparing report of 2018 with 2019. So set 1 of report is included in package and the 2nd set (to see how the reports vary) is attached externally.
Additionally if you look at how I'm importing data from excel sheets. I'm using three different inputs to import data from 3 different sheets of the same file. How can i do this in one import? I tried searching but since the structure of these 3 sheets isn't the same so most solutions i found didn't work.
This is one way of solving based on the sample table you share (because I wasn't able to open the workflow you shared as the input files were linked to your desktop - to share the input files you may need to package it and then upload)
Welcome to the community! I wouldn't go down the multi-row formula route as if the column headers or the number of columns change you would need to amend your workflow, i would be tempted to go down the route of cross-tabbing and transposing. Below is a screenshot of my workflow (also attached) which uses the snippet of data you gave us.
Also in order for us to be able to use your attachment it needs to be saved as a packaged workflow (.yxzp) which is in effect a zipped file containing extracts of any local files you've used in your workflow (currently when we run these files can't be found and error out).
To save the workflow as a .yxzp you'll need to go to Options -> Export Workflow -> Save
If you can attach your new packaged workflow i can take a look, I've also attached my example for you to download and look at.
If this solves your issue please mark the answer as correct, if not let me know!
I have updated the workflow as a package in the original post. I have included a second set of report externally so that u guys can see the variations.
Additionally i if you look at how I'm importing data from excel sheets. I'm using three different inputs to import data from 3 different sheets of the same file. How can i do this in one import? I tried searching but since the structure of these 3 sheets isn't the same so most solutions i found didn't work.