cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Filter only text in address column

Hello all,

 

i  need your help to filter a address column that only have the text value (see example)

 

How can i only return the rows that contains only text / addressname without housenumber?

 

So for example i need only return the memberid 2342234 and 221111


  

 

Any suggestions?

Naamloos.png

 

Greets,

 

Rega

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft
Microsoft

Re: Filter only text in address column

Hi @Anonymous,

 

Please refer to this blog to modify the Power Query to filter data records.

 

1.PNG2.PNG3.PNG

 

Power Query reference:

let
    CharsToRemove = List.Transform({33..45,47,58..126}, each Character.FromNumber(_)),
    Source = Excel.Workbook(File.Contents("C:\Users\xxxx\Desktop\Sample Data.xlsx"), null, true),
    Test3_Sheet = Source{[Item="Test3",Kind="Sheet"]}[Data],
    #"Promoted Headers" = Table.PromoteHeaders(Test3_Sheet, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"memberid", Int64.Type}, {"value", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Result", each Text.Remove([value],CharsToRemove)),
    #"Filtered Rows" = Table.SelectRows(#"Added Custom", each ([Result] = ""))
in
    #"Filtered Rows"

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Microsoft
Microsoft

Re: Filter only text in address column

Hi @Anonymous,

 

Please refer to this blog to modify the Power Query to filter data records.

 

1.PNG2.PNG3.PNG

 

Power Query reference:

let
    CharsToRemove = List.Transform({33..45,47,58..126}, each Character.FromNumber(_)),
    Source = Excel.Workbook(File.Contents("C:\Users\xxxx\Desktop\Sample Data.xlsx"), null, true),
    Test3_Sheet = Source{[Item="Test3",Kind="Sheet"]}[Data],
    #"Promoted Headers" = Table.PromoteHeaders(Test3_Sheet, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"memberid", Int64.Type}, {"value", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Result", each Text.Remove([value],CharsToRemove)),
    #"Filtered Rows" = Table.SelectRows(#"Added Custom", each ([Result] = ""))
in
    #"Filtered Rows"

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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!.

Top Solution Authors
Top Kudoed Authors
Users online (751)