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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
dhruvgulati
Helper I
Helper I

How to filter out only letter in a columns

i want to filter out  only words (numbers not allowed ) from a column without adding a column.

Table.AddColumn(#"Changed Type", "Custom1", each Text.Select([Column1],{"A".."z"}))

1 ACCEPTED SOLUTION

Use this

= Table.ReplaceValue(#"Changed Type",each [Column1],each if Value.Is(Number.From([Column1]), type number) then null else [Column1] ,Replacer.ReplaceValue,{"Column1"})

View solution in original post

7 REPLIES 7
Vijay_A_Verma
Super User
Super User

Use this

 

= Table.ReplaceValue(#"Changed Type",each [Column1],each Text.Select([Column1],{"A".."z"," "}),Replacer.ReplaceValue,{"Column1"})

 

Thanks this worked is there a way that filter out like 

sample input  

sdjwd

122

33wdwq

213

adsdwd232

dw

output

sdjwd

33wdwq
adsdwd232
dw

Use this

= Table.ReplaceValue(#"Changed Type",each [Column1],each if Value.Is(Number.From([Column1]), type number) then null else [Column1] ,Replacer.ReplaceValue,{"Column1"})
latimeria
Solution Specialist
Solution Specialist

Hi @dhruvgulati ,

 Table.TransformColumns( Source, {"Column1", each Text.Select(_,{"A".."z"})})

#"Filtered Rows2" =Table.TransformColumns( Source, {#"Filtered Rows1", each Text.Select(_,{"A".."z"})})
 error 

Expression.Error: We cannot convert a value of type Table to type List. Details: Value=[Table] Type=[Type]

syntax:

#"Filtered Rows2" =Table.TransformColumns( PreviousStep, {"Column name to transform", each Text.Select(_,{"A".."z"})})

in your case

#"Filtered Rows2" =Table.TransformColumns( #"Filtered Rows1", {"Custom1", each Text.Select(_,{"A".."z"})})

Or you can user Table.ReplaceValue, same output.

Vijay_A_Verma
Super User
Super User

Can you post some sample data and result corresponding to the data?

Helpful resources

Announcements
September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Top Solution Authors