cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Extracting the first comma separated value to a new column

This seems like it should be easy but I am having a bit of trouble. I have a list of clients each client has multiple servers. Each server for that client has the same specs and I have a separate spreadsheet with Specs on it. 

 

So to join the two together I just need one common server. 

 

The Webserver column lists the servers as "Server1,Server2,Server3"

 

I want to extract Server1 only for each client and populate a column called FirstServer. I can then join on that value to add in the specs for each client. Hope that makes sense 🙂 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Extracting the first comma separated value to a new column

In addition: if you want the result in a new column: choose Extract in the "Add Column" tab.

In the Extract submenu, "Text Before Ddelimiter" should suit your needs,

Specializing in Power Query Formula Language (M)

View solution in original post

5 REPLIES 5
Highlighted
Frequent Visitor

Re: Extracting the first comma separated value to a new column

Hey Buddy.

 

You can use the "Extract" function, under the Transform tab in the query editor. This function allows you to choose the separator, in your case, the comma. 

Hope it helps

 

Regards

Highlighted
Community Champion
Community Champion

Re: Extracting the first comma separated value to a new column

In addition: if you want the result in a new column: choose Extract in the "Add Column" tab.

In the Extract submenu, "Text Before Ddelimiter" should suit your needs,

Specializing in Power Query Formula Language (M)

View solution in original post

Highlighted
Regular Visitor

Re: Extracting the first comma separated value to a new column

I am new to using PowerBI Desktop and I only see Home and Modeling tabs. Do I need to add tabs in options some where?

Highlighted
Community Champion
Community Champion

Re: Extracting the first comma separated value to a new column

No, you can choose "Edit Queries" on the Home tab.

 

Then you will see the tabs and options we mentioned previously.

Specializing in Power Query Formula Language (M)
Highlighted
Regular Visitor

Re: Extracting the first comma separated value to a new column

Worked perfectly. Thanks guys!

Helpful resources

Announcements
Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors