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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
v-stephen-msft
Community Support
Community Support

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
v-stephen-msft
Community Support
Community Support

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
Super User
Super User

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors