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
kenzzzo82
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

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
Gui_Costa
Frequent Visitor

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

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?

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)

Worked perfectly. Thanks guys!

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)

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.