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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
arafmustavi
Frequent Visitor

Data Split into Tables and Append Tables

Hi,
I have loaded the data from and excel and the excel sheet has three table in a sheet. My dataset looks like this
CATEGORY A  CATEGORY B CATEGORY C
PRODUCT  PRICE  PRODUCT  PRICE   PRODUCT  PRICE
PROD A1 100 PROD A2 150 PROD A3 150
PROD B1 200 PROD B2 250 PROD B3 250
I need my Data in the following format
CATEGORY PRODUCT PRICE
A PROD A1 100
A PROD B1 200
B PROD A2 150
B PROD B2 250
C PROD A3 150
C PROD B3 250
Any idea how I can do this?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @arafmustavi ,

 

Supposing below is your data.

vstephenmsft_0-1676276796349.png

You can duplicate two tables and set three tabls to the same column names, "PRODUCT", "PRICE", and "CATEOGRY".

The "CATEGORY" is a custom column added manually.

Table:

vstephenmsft_13-1676279165362.png

Table (2):

vstephenmsft_14-1676279175925.png

Table (3):

vstephenmsft_15-1676279185889.png

Append them.

vstephenmsft_12-1676279140663.png

vstephenmsft_16-1676279210242.png

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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

2 REPLIES 2
Anonymous
Not applicable

Hi @arafmustavi ,

 

Supposing below is your data.

vstephenmsft_0-1676276796349.png

You can duplicate two tables and set three tabls to the same column names, "PRODUCT", "PRICE", and "CATEOGRY".

The "CATEGORY" is a custom column added manually.

Table:

vstephenmsft_13-1676279165362.png

Table (2):

vstephenmsft_14-1676279175925.png

Table (3):

vstephenmsft_15-1676279185889.png

Append them.

vstephenmsft_12-1676279140663.png

vstephenmsft_16-1676279210242.png

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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

 

ImkeF
Community Champion
Community Champion

Hi @arafmustavi ,
having problems to understand the structure of your source data, specifically the headers.
Please check out this article on how to provide usable sample data: How to provide sample data in the Power BI Forum - Microsoft Power BI Community

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors