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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
arikofather
Helper I
Helper I

Creating new column eliminating some names with conditions

Transform Contacts.pbix

 

I have a simple table with list of names.  Some have email addresses instead of names.

 

arikofather_0-1704657343887.png

 

I need to create a new colum of attendees to only select names and not those with email addresses.  Result column should be  as below:

arikofather_1-1704657497267.png

 

Can anyone help with the calculalated column?

 

Thank.

 

 

1 ACCEPTED SOLUTION
ThxAlot
Super User
Super User

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("dY/NCoJQEIVf5eI6eoG70Yz+RBJaiotRJx28zsRcK3z7wiAKa30+vnNOngcrKc0OnLNbxcakosjVaPdKTCYhbuwaSpNdFe/g7AldOZqoI/b2lGWZSRGHJxQUizyIuFYalxtw0kuYEuOykt6mVLWAzsQK9MuW0IA6tx2EYWiBTSy+F/8Fn9EplIRhjTfhC2gH9Y28qJ8aP8bPtP867SudroXHl2eeR2/AT0hQFA8=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Attendees = _t]),
    #"Removed email" = Table.AddColumn(Source, "Result", each Text.Combine(List.Select(Text.Split([Attendees], ";"), each not Text.Contains(_, "@")), ","))
in
    #"Removed email"

ThxAlot_0-1704664631795.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



View solution in original post

2 REPLIES 2
ThxAlot
Super User
Super User

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("dY/NCoJQEIVf5eI6eoG70Yz+RBJaiotRJx28zsRcK3z7wiAKa30+vnNOngcrKc0OnLNbxcakosjVaPdKTCYhbuwaSpNdFe/g7AldOZqoI/b2lGWZSRGHJxQUizyIuFYalxtw0kuYEuOykt6mVLWAzsQK9MuW0IA6tx2EYWiBTSy+F/8Fn9EplIRhjTfhC2gH9Y28qJ8aP8bPtP867SudroXHl2eeR2/AT0hQFA8=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Attendees = _t]),
    #"Removed email" = Table.AddColumn(Source, "Result", each Text.Combine(List.Select(Text.Split([Attendees], ";"), each not Text.Contains(_, "@")), ","))
in
    #"Removed email"

ThxAlot_0-1704664631795.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



wini_R
Solution Supplier
Solution Supplier

Hi @arikofather ,
Is power query solution OK to you? If so, please paste the code below in the Advanced Editor:

wini_R_0-1704662527246.png

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("dc9NDoJADAXgq0xcGy8wGxTjb4gkLAmLAhUahtZ0UMPtRUyMBt32NV9f03S25FKpX2zASStBRIyLQlobUVEDOhMqUGXXkJv4qngHZxN0eW+O1KHaJI5jEyF2xNUsmw9asmyIfXDy3j+dcbiS3OzAObtVrEwkilz0dq/ENDj8ix+VKX8Qhq4GNqH4VvxXlzM6hZwwKPEmfAFtoLyRFx2LfJ6bsO/S4+ZnbF/5n5eHNHsA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Attendees = _t]),
    #"Added Custom" = Table.AddColumn(Source, "Attendees Clean", each Text.Split([Attendees], ";") ),
    #"Expanded Attendees Clean" = Table.ExpandListColumn(#"Added Custom", "Attendees Clean"),
    #"Filtered Rows" = Table.SelectRows(#"Expanded Attendees Clean", each ([Attendees Clean] <> "" and not Text.Contains([Attendees Clean], "@"))),
    #"Grouped Rows" = Table.Group(#"Filtered Rows", {"Attendees"}, {{"Attendees Clean", each _[Attendees Clean] }} ),
    #"Extracted Values" = Table.TransformColumns(#"Grouped Rows", {"Attendees Clean", each Text.Combine(List.Transform(_, Text.From), ";"), type text})
in
    #"Extracted Values"

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors