Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Icon for Administrator rankAdministrator
4 years ago
Solved

HELP! Anyone know how to replace values in a column based on values in a column (like a VLOOKUP) in a dataflow?

I have an unpivoted table for which I need to replace column attributes with a set of column values. It's probably easier for me to visualize. Here's the starting point:

arpost_0-1639098016178.png

I am wanting to replace the "Column#" values in the Attribute column so they match the "header" values in the Value column; this would be the desired result:

arpost_1-1639098130104.png

If this were Excel, I'd probably just do a VLOOKUP, but I'm not sure how to achieve that with Power Query without resorting to a separate query.

  • You need to promote those values to headers before the unpivot other column step. For example:

    It then looks like this:

     

    Then unpivot.

     

     

     

2 Replies

  • edhans's avatar
    edhans
    Icon for Community Champion rankCommunity Champion

    You need to promote those values to headers before the unpivot other column step. For example:

    It then looks like this:

     

    Then unpivot.