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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
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
v-yulgu-msft
Employee
Employee

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
v-yulgu-msft
Employee
Employee

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.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.