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
Baileyleeg
New Member

Transform Column into Multiple Rows based on cell with many delimiters

Hello I'm hopeful someone can assist with transforming a product line that has multiple pack sizes in one column into multiple rows. I believe this can be done in Power Query but I have been unable to find the instructional video demostrating the steps required. 

 

Current Input:

 

Product Name

Company

Brand

Constituent

Formulation

Pack Sizes

TERBYNE XTREME 875 WG HERBICIDE

SYNGENTA AUST

SYNGENTA

terbuthylazine(875g/kg)

WDG

10kg, 15kg, 20kg

 

Desired Output:

 

Product Name

Company

Brand

Constituent

Formulation

Pack Sizes

TERBYNE XTREME 875 WG HERBICIDE

SYNGENTA AUST

SYNGENTA

terbuthylazine(875g/kg)

WDG

10kg

TERBYNE XTREME 875 WG HERBICIDE

SYNGENTA AUST

SYNGENTA

terbuthylazine(875g/kg)

WDG

15kg

TERBYNE XTREME 875 WG HERBICIDE

SYNGENTA AUST

SYNGENTA

terbuthylazine(875g/kg)

WDG

20kg

 

Many thanks in advance for any assistance.

2 ACCEPTED SOLUTIONS
Mikelytics
Resident Rockstar
Resident Rockstar

Hi @Baileyleeg,

 

Please use the split column feature

Mikelytics_3-1667388974206.png

 

Mikelytics_4-1667389004906.png

 

Mikelytics_2-1667388924713.png

Result

Mikelytics_5-1667389033315.png

 

 

Best regards

Michael

 

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

 

 

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

View solution in original post

Baileyleeg
New Member

Thanks @Greg_Deckler I appreciate your quick response. In the database there are 1000s of row items as follows. Would the split and unpivot work in this circumstance? Thanks

Input:

 

Product Name

Company

Brand

Constituent

Formulation

Pack Sizes

TERBYNE XTREME 875 WG HERBICIDE

SYNGENTA AUST

SYNGENTA

terbuthylazine(875g/kg)

WDG

10kg, 15kg, 20kg

FUHUA GLYPHOSATE 450 HERBICIDE

SICHUAN LESHAN

FUHUA

glyphosate as ipa(450g/L)

SL

5L, 10L, 20L, 110L, 200L, 1000L

 

Desired Output:

 

Product Name

Company

Brand

Constituent

Formulation

Pack Sizes

TERBYNE XTREME 875 WG HERBICIDE

SYNGENTA AUST

SYNGENTA

terbuthylazine(875g/kg)

WDG

10kg

TERBYNE XTREME 875 WG HERBICIDE

SYNGENTA AUST

SYNGENTA

terbuthylazine(875g/kg)

WDG

15kg

TERBYNE XTREME 875 WG HERBICIDE

SYNGENTA AUST

SYNGENTA

terbuthylazine(875g/kg)

WDG

20kg

FUHUA GLYPHOSATE 450 HERBICIDE

SICHUAN LESHAN

FUHUA

glyphosate as ipa(450g/L)

SL

5L

FUHUA GLYPHOSATE 450 HERBICIDE

SICHUAN LESHAN

FUHUA

glyphosate as ipa(450g/L)

SL

10L

FUHUA GLYPHOSATE 450 HERBICIDE

SICHUAN LESHAN

FUHUA

glyphosate as ipa(450g/L)

SL

20L

FUHUA GLYPHOSATE 450 HERBICIDE

SICHUAN LESHAN

FUHUA

glyphosate as ipa(450g/L)

SL

110L

FUHUA GLYPHOSATE 450 HERBICIDE

SICHUAN LESHAN

FUHUA

glyphosate as ipa(450g/L)

SL

200L

FUHUA GLYPHOSATE 450 HERBICIDE

SICHUAN LESHAN

FUHUA

glyphosate as ipa(450g/L)

SL

1000L

View solution in original post

3 REPLIES 3
Baileyleeg
New Member

Thanks @Greg_Deckler I appreciate your quick response. In the database there are 1000s of row items as follows. Would the split and unpivot work in this circumstance? Thanks

Input:

 

Product Name

Company

Brand

Constituent

Formulation

Pack Sizes

TERBYNE XTREME 875 WG HERBICIDE

SYNGENTA AUST

SYNGENTA

terbuthylazine(875g/kg)

WDG

10kg, 15kg, 20kg

FUHUA GLYPHOSATE 450 HERBICIDE

SICHUAN LESHAN

FUHUA

glyphosate as ipa(450g/L)

SL

5L, 10L, 20L, 110L, 200L, 1000L

 

Desired Output:

 

Product Name

Company

Brand

Constituent

Formulation

Pack Sizes

TERBYNE XTREME 875 WG HERBICIDE

SYNGENTA AUST

SYNGENTA

terbuthylazine(875g/kg)

WDG

10kg

TERBYNE XTREME 875 WG HERBICIDE

SYNGENTA AUST

SYNGENTA

terbuthylazine(875g/kg)

WDG

15kg

TERBYNE XTREME 875 WG HERBICIDE

SYNGENTA AUST

SYNGENTA

terbuthylazine(875g/kg)

WDG

20kg

FUHUA GLYPHOSATE 450 HERBICIDE

SICHUAN LESHAN

FUHUA

glyphosate as ipa(450g/L)

SL

5L

FUHUA GLYPHOSATE 450 HERBICIDE

SICHUAN LESHAN

FUHUA

glyphosate as ipa(450g/L)

SL

10L

FUHUA GLYPHOSATE 450 HERBICIDE

SICHUAN LESHAN

FUHUA

glyphosate as ipa(450g/L)

SL

20L

FUHUA GLYPHOSATE 450 HERBICIDE

SICHUAN LESHAN

FUHUA

glyphosate as ipa(450g/L)

SL

110L

FUHUA GLYPHOSATE 450 HERBICIDE

SICHUAN LESHAN

FUHUA

glyphosate as ipa(450g/L)

SL

200L

FUHUA GLYPHOSATE 450 HERBICIDE

SICHUAN LESHAN

FUHUA

glyphosate as ipa(450g/L)

SL

1000L

Mikelytics
Resident Rockstar
Resident Rockstar

Hi @Baileyleeg,

 

Please use the split column feature

Mikelytics_3-1667388974206.png

 

Mikelytics_4-1667389004906.png

 

Mikelytics_2-1667388924713.png

Result

Mikelytics_5-1667389033315.png

 

 

Best regards

Michael

 

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

 

 

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!
Greg_Deckler
Super User
Super User

@Baileyleeg So in Power Query, you would generally split that column and then unpivot the resulting columns.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.