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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.