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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
KevSan
Regular Visitor

Extract sequence of min 8 figures in a text

Hi everybody,

 

I'm trying to extract in powerquery an information of minimum length of 8 figures in a text. 

I don't know how to do that. Could someone please help me? 

Here is an example with the expected result

KevSan_0-1682504797096.png

 

2 ACCEPTED SOLUTIONS
Ahmedx
Super User
Super User

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

https://1drv.ms/u/s!AiUZ0Ws7G26Rh1Ck2Fo9nETCIftF?e=hXieqJ

 

[
  f=   {"a".."z","A".."Z",";","-",",","(",")","/",".","-","_","#","№","@","?",":","!","%","&","$","#","*","+",">","<","""","<<","«","»"},
  to = Text.Combine(List.Select( Splitter.SplitTextByAnyDelimiter(f)([Noh]),(x)=> Text.Length(x)>=8))
 ][to]

 

Screen Capture #950.png

View solution in original post

I corrected it, try again, but it's better if you show me where code can't extract

View solution in original post

4 REPLIES 4
KevSan
Regular Visitor

First, thanks for your answer.

 

Many of my cases are good with your solution but I don't understand it, so can't adjust with some other not right cases.

 

Could you explain me?

show these cases

Ahmedx
Super User
Super User

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

https://1drv.ms/u/s!AiUZ0Ws7G26Rh1Ck2Fo9nETCIftF?e=hXieqJ

 

[
  f=   {"a".."z","A".."Z",";","-",",","(",")","/",".","-","_","#","№","@","?",":","!","%","&","$","#","*","+",">","<","""","<<","«","»"},
  to = Text.Combine(List.Select( Splitter.SplitTextByAnyDelimiter(f)([Noh]),(x)=> Text.Length(x)>=8))
 ][to]

 

Screen Capture #950.png

I corrected it, try again, but it's better if you show me where code can't extract

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.