Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Merging data from multiple sheets in PowerBi

I have a workbook with several sheets that all have the same table layout. I want to combine these tables into one, but I also want to preserve the sheet names as labels for each section of the merged table.

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

     

    After connecting to the data source, click "transform data" to enter the power query.
    For the s1 table, add a custom column.

    Merges the column with the type column.

    Repeat the same steps to add custom columns to the s2 and s3 tables and then merge them.

    Then append these three tables.

    Then the result is as follows.

    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

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    After connecting to the data source, click "transform data" to enter the power query.
    For the s1 table, add a custom column.

    Merges the column with the type column.

    Repeat the same steps to add custom columns to the s2 and s3 tables and then merge them.

    Then append these three tables.

    Then the result is as follows.

    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. 

  • sounds good.  What have you tried and where are you stuck?  

     

    Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

    Do not include sensitive information or anything not related to the issue or question.

    If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216

    Please show the expected outcome based on the sample data you provided.

    Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

    • Anonymous's avatar
      Anonymous
      Not applicable

      Unfortunately, I can't provide a sample. Here's the detailed explanation: I have an Excel file with sheets named S1, S2, S3, S4, and so forth. All these sheets have the same table structure, meaning they have identical columns but different rows. I'm trying to merge the data from these sheets into a single table. To distinguish between the tables, I want to use the sheet names as IDs

      • lbendlin's avatar
        lbendlin
        Super User

        I cannot assist you if you are unable to provide sample data. I hope someone else can help you further.