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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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