Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
lahcen_aglagal
Frequent Visitor

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.

1 ACCEPTED SOLUTION
v-tangjie-msft
Community Support
Community Support

Hi @lahcen_aglagal ,

 

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

vtangjiemsft_0-1712304024267.png

Merges the column with the type column.

vtangjiemsft_1-1712304076759.pngvtangjiemsft_2-1712304128145.png

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

vtangjiemsft_3-1712304189952.pngvtangjiemsft_4-1712304201282.png

Then append these three tables.

vtangjiemsft_5-1712304284796.pngvtangjiemsft_6-1712304313263.png

Then the result is as follows.

vtangjiemsft_7-1712304333471.png

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. 

View solution in original post

4 REPLIES 4
v-tangjie-msft
Community Support
Community Support

Hi @lahcen_aglagal ,

 

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

vtangjiemsft_0-1712304024267.png

Merges the column with the type column.

vtangjiemsft_1-1712304076759.pngvtangjiemsft_2-1712304128145.png

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

vtangjiemsft_3-1712304189952.pngvtangjiemsft_4-1712304201282.png

Then append these three tables.

vtangjiemsft_5-1712304284796.pngvtangjiemsft_6-1712304313263.png

Then the result is as follows.

vtangjiemsft_7-1712304333471.png

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. 

lbendlin
Super User
Super User

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-...

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/1447...

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

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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.