Power Query - Add a Merged Column Dynamically

Viewed 23

I have a Power Query that has a list of several positions, and in each row i can have more than 1 positions in the same column/row, separate by commas. And what i want its to know the email of the person that are in each position.

What i did was to slip in separate columns the positions that were together, creating several new columns for each position in the same row.

After having the new columns i would do a merge, for each position in each column, with my table that has the emails of the person that are in that position.

For example if i have:

  • Column position_1
  • Column position_2

i would have 2 merged columns from another table to fetch the email from each position:

  • Column email_1
  • Column email_2

But the problem is that the columns of the positions aren't fixed, they can be 2/3/4/etc, so my question is: Can i make, dynamically, a new merge column for a new position column i could have? I.e. if i have a new column position_3 my Power Query could make a new merged column, from another table, email_3?

If no, do you have an alternative idea for my problem? With several positions in the same column/row can i have the email of each separate position?

Hope i explained myself.

thank you beforehand

0 Answers
Related