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

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 Supplier
Solution Supplier

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 Supplier
Solution Supplier

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
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors
Top Kudoed Authors