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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sparkplug9375
Helper III
Helper III

Help With Dividing Column by Row number

Hello,

 

I uploaded a PDF to Power BI. The PDF is not formatted well, so neither is the pbix. I am looking to seperate everything into two rows: headers and columns. After transposing the data, most headers are in the correct position with the data below it correct.

 

However, some of it IE row 2 it not. Is there a way to take the content in rows 2 (the header) and 3 (the data) into its own column. The header corresponds correctly with row 1

 

Header Dogs

Row 1   Golden Retriever

Row 2   Cats

Row 3   Tiger

 

How can Cats become a header in its own column with Tiger?

 

Thanks!

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

Hi @sparkplug9375 ,

I create a sample to implement it in Power Query that you can have a try.

  • pivot column 

1.PNG

  • unpivot columns4.PNG

 

5.PNG

  • remove columns

6.PNG

  • remove alternate rows

7.PNG8.PNG

Best Regards,

Xue Ding

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

Best Regards,
Xue Ding
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-xuding-msft
Community Support
Community Support

Hi @sparkplug9375 ,

I create a sample to implement it in Power Query that you can have a try.

  • pivot column 

1.PNG

  • unpivot columns4.PNG

 

5.PNG

  • remove columns

6.PNG

  • remove alternate rows

7.PNG8.PNG

Best Regards,

Xue Ding

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

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
sturlaws
Resident Rockstar
Resident Rockstar

Hi @sparkplug9375,

on a dataset as simple as you example it is possible:
create a duplicate table
remove bottom 2 rows from table1
remove top 2 rows from table2

transpose both tables

append the tables
transpose the appended table
promote headers

If this is possible in your case will depend on the shape of you data.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.