About EasyMorph Tutorials & Examples Web-help

Iterate and append columns

Hello,

I’m sure this is very simple but I cannot figure it out.

We’ve sent out a questionnaire to multiple individuals, each questionnaire being a single workbook.

The workbook is identical in terms of rows (i.e. the questions asked), however is unique in terms of columns, where each column represents a company name that the question relates to.

What I am now looking to do is iterate through each of the questionnaires, and append only the columns. What I am finding is that the iterate function is repeating the questions and appending the columns.

What I have done so far is expose the names of the files that I want to iterate using the “List of Files” function. I then ran an “Iterate” function calling the module where the excel questionnaires are being imported.

Thank you!

Hi Adil and welcome to the Community!

Can’t see a question in your post but I understand the task.

I don’t think you need to use “Iterate columns” here. I would rather iterate all the files and unpivot each file. This would give you a big unpivoted straight table with data from all files. Then I would pivot the table back, this time with all data from all companies.

As a rule of thumb, when you deal with matrix data in EasyMorph, typically you will need to unpivot it first, transform as necessary, then pivot back.

The most elegant solutions are the simplest!

Thanks so much for your help. This worked!

You’re welcome!

To learn more about EasyMorph visit easymorph.com.