Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

merging into new file

Hi, I have a file with 4 columns:

A  B  C  D  (all number)

1  2  3  4

5  6  7  8

What I want is 1 column (in a new file) with all values under eachother:

X

1

2

3

4

5

6

7

8

 

Is this possible in Power Query? (Or mayby DAX?). Thank you.

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous 

     

    Please try this:
    First of all, I create a set of sample:

    Then click the Transform data in the home pane:

    Then choose all the columns and click the unpivot Columns in transform pane:

    The result is as follow:

    Then click close&apply

     

    Best Regards

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

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous 

     

    Please try this:
    First of all, I create a set of sample:

    Then click the Transform data in the home pane:

    Then choose all the columns and click the unpivot Columns in transform pane:

    The result is as follow:

    Then click close&apply

     

    Best Regards

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thanks for your help. Indeed it's working with a trstfile like the one you described. But when I do the same steps on my file (more then 30 columns, but I try to merge 4 of these), an unexpected error opccured. But what the error is, I don't know.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Anonymous 

       

      Could you please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

      How to provide sample data in the Power BI Forum

      How to Get Your Question Answered Quickly

      And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

      How to upload PBI in Community

      Best Regards

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thanks for your help, it was the solution. I couldn't do it first, because of the NULL values in some of the rows. After filtering these, your solution worked.