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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
anshpalash
Helper II
Helper II

Transform Table

Hi all, I have data in format:

1Scrap12nullNumber of Products10nullnull
2nullScrap12nullnullNumber of Products20
3Scrap9nullNumber of Products13nullnull
4nullScrap14nullNumber of Products27null
5Scrapnull12nullnullNumber of Products45
6Scrap3nullNumber of Products25  

 

Location of 'Number of Products' is different for every file. I want to convert this into format: 

 Number of Products
110
220
313
427
545
625

 

Can somebody please help?

 

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

Hi, @anshpalash 

 

You can merge other columns and create a custom column to display your desired result in Power Query.

Like this:

vjaneygmsft_0-1633943251166.png

 

Text.Range([Merged],Text.PositionOf([Merged],"Number of Products,")+19,2)

 

vjaneygmsft_2-1633943297492.png

 

vjaneygmsft_1-1633943272597.png

Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.


Best Regards,

Community Support Team _ Janey

 

View solution in original post

2 REPLIES 2
v-janeyg-msft
Community Support
Community Support

Hi, @anshpalash 

 

You can merge other columns and create a custom column to display your desired result in Power Query.

Like this:

vjaneygmsft_0-1633943251166.png

 

Text.Range([Merged],Text.PositionOf([Merged],"Number of Products,")+19,2)

 

vjaneygmsft_2-1633943297492.png

 

vjaneygmsft_1-1633943272597.png

Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.


Best Regards,

Community Support Team _ Janey

 

Natallia_23
Resolver I
Resolver I

Hi, Do you have column headers in file and if the numer of columns is known?
I did this in PowerQuery:

Natallia_23_1-1633534263982.png

add custom column:
=if Text.Contains([Column1], "Number of Products") then [Column1]
else if Text.Contains([Column2], "Number of Products") then[Column2]
else if Text.Contains([Column3], "Number of Products") then[Column3] else 0

 

then split by delimiter

Natallia_23_2-1633534590559.png

Natallia_23_3-1633534618791.png

and remove all exccept id and last column.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.