Forum Discussion

ERing's avatar
ERing
Icon for Post Partisan rankPost Partisan
2 years ago
Solved

How can I return a result for each value in a string?

Somewhat new to this, so I may not be using the correct terms. I have data like shown in Column 1 and I need to be able to show a table that would be the Return Column. So basically for the row with Marketing Finance, I need a new column that will show me a row for Marketing and a row for Finance.

Is this possible?

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi ERing ,

     

    According to your description, here are my steps you can follow as a solution.

    (1) My test data is the same as yours.

    (2) Click "transform data" to enter the power query editor -> split the column ->choose all columns -> Unpivot columns->Remove redundant columns.

    Best Regards,

    Neeko Tang

    If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

4 Replies

  • You have 3 input rows and 4 output rows. Not sure what input goes with what output. Can you put the data side by side? Is the output supposed to be in the same table as the input?

    • ERing's avatar
      ERing
      Icon for Post Partisan rankPost Partisan

      ToddChitt  Apologies. I used the wrong example for the return column. My fact table has 3 rows and I need to be able to produce a visual that be the returns a row for Marketing AND a row for Finance from row 3.

       

       

      • ToddChitt's avatar
        ToddChitt
        Icon for Super User rankSuper User

        I still don't understand how the input is supposed to translate to the output. 3 rows in, 4 rows out. Can you sketch it out in Excel, maybe, and post a screenshot?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi ERing ,

     

    According to your description, here are my steps you can follow as a solution.

    (1) My test data is the same as yours.

    (2) Click "transform data" to enter the power query editor -> split the column ->choose all columns -> Unpivot columns->Remove redundant columns.

    Best Regards,

    Neeko Tang

    If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly.