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
RAdams
Helper III
Helper III

split values into multiple rows

Hello everyone. I'm hoping I can get some help on this as I've exhausted my limited knowledge and research abilities on this one. 

 

I need to split multiple Customer Accounts that are input in one cell with a Comma delimiter into multiple rows.

 

I'm given this type of table:

 

Visit DateSales RepVisisted AccountsTarget Accounts
2/27/2017TEAM CIG-J UNKEL-113465, 54572222, 3333, 44444
2/24/2017TEAM CRI-D LEPE-26154652222, 3333, 44445
2/24/2027TEAM CRI-D POLETTI-20 2222, 3333, 44446
2/24/2027TEAM SHI-B SULLIVAN-846144, 65462222, 3333, 44447

 

And I need to parse out the Account numbers into different tables. Like the two below:

 

Visit DateSales RepVisisted Accounts
2/27/2017TEAM CIG-J UNKEL-113465
2/27/2017TEAM CIG-J UNKEL-115457
2/24/2017TEAM CRI-D LEPE-2615465
2/24/2027TEAM CRI-D POLETTI-20 
2/24/2027TEAM SHI-B SULLIVAN-846144
2/24/2027TEAM SHI-B SULLIVAN-846546

 

And 

 

Visit DateSales RepTarget Accounts
2/27/2017TEAM CIG-J UNKEL-111,111
2/27/2017TEAM CIG-J UNKEL-112,222
2/27/2017TEAM CIG-J UNKEL-113,333
2/24/2017TEAM CRI-D LEPE-2614,444
2/24/2017TEAM CRI-D LEPE-2615,555
2/24/2017TEAM CRI-D LEPE-2616,666
2/24/2027TEAM CRI-D POLETTI-207,777
2/24/2027TEAM CRI-D POLETTI-208,888
2/24/2027TEAM CRI-D POLETTI-209,999
2/24/2027TEAM SHI-B SULLIVAN-840000
2/24/2027TEAM SHI-B SULLIVAN-84123

 

I initially Duplicated the Columns in Query Editor and then split using the Comma as the delimter but that just gave me extra columns, which gets me close, but I still need to split into multiple rows. 

 

Any help on this would be appreciated!

Thanks!

R

2 ACCEPTED SOLUTIONS
Vvelarde
Community Champion
Community Champion

@RAdams

 

Hi, this is the long version , i'm sure that exists shorter versions of this

 

 

 




Lima - Peru

View solution in original post

Vvelarde,

 

Thanks for the quick reply and going above and beyond just answering my request for help. 

 

I'm excited to try this solution. I will let you know. 

 

Thanks again!

 

R

View solution in original post

3 REPLIES 3
Vvelarde
Community Champion
Community Champion

@RAdams

 

Hi, this is the long version , i'm sure that exists shorter versions of this

 

 

 




Lima - Peru

Thanks Vvelarde! Worked like a peach!

 

R.

 

Vvelarde,

 

Thanks for the quick reply and going above and beyond just answering my request for help. 

 

I'm excited to try this solution. I will let you know. 

 

Thanks again!

 

R

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.