cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
amandabus21
Helper V
Helper V

Filtering out

Hello,

 

Is there a way I can only keep values that have 10 digits?


For example I want to keep only the fields that have 10 digits?

 

amandabus21_0-1679337303029.png

 

2 ACCEPTED SOLUTIONS
latimeria
Solution Specialist
Solution Specialist

Hi @amandabus21 ,

 

try this:

Table.SelectRows(PreviousStep, each Text.Length([Column1]) > 10 )

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMDI0MLI0MDRQitWB8IHIHIVjYmpmhFuWDhwzAwNzCxjHwMAYwTTEKoqdaUgaMxYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
    #"Filtered Rows" = Table.SelectRows(Source, each Text.Length([Column1]) > 10 )
in
    #"Filtered Rows"

 

View solution in original post

ND_Pard
Helper II
Helper II

I like the solution provided above by: latimeria; however, instead of " > 10 ", I think you would want " = 10 ".

Good luck.

View solution in original post

2 REPLIES 2
ND_Pard
Helper II
Helper II

I like the solution provided above by: latimeria; however, instead of " > 10 ", I think you would want " = 10 ".

Good luck.

latimeria
Solution Specialist
Solution Specialist

Hi @amandabus21 ,

 

try this:

Table.SelectRows(PreviousStep, each Text.Length([Column1]) > 10 )

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMDI0MLI0MDRQitWB8IHIHIVjYmpmhFuWDhwzAwNzCxjHwMAYwTTEKoqdaUgaMxYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
    #"Filtered Rows" = Table.SelectRows(Source, each Text.Length([Column1]) > 10 )
in
    #"Filtered Rows"

 

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors