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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
toum
Helper II
Helper II

Search Digit

Hello, 

 

Please I need your help on this I want to serach for the 4 first consecutive digit in a text using dax, here an exemple 

toum_0-1676472645989.png

Thank you in advance

1 ACCEPTED SOLUTION
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://dropmefiles.com/iKZRG

If this post helps,
then please consider accepting it as the solution to help other members find it faster,
and give a big thumbs up.
Screen Capture #315.pngScreen Capture #316.png

View solution in original post

2 REPLIES 2
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://dropmefiles.com/iKZRG

If this post helps,
then please consider accepting it as the solution to help other members find it faster,
and give a big thumbs up.
Screen Capture #315.pngScreen Capture #316.png

v-zhangti
Community Support
Community Support

Hi, @toum 

 

You can try the following methods.
In the Power Query-Add Custom Column:

Text.Combine( List.Range(List.Select( Text.ToList(Text.Replace([Column]," ","")),each _<"A"),0,4))

vzhangti_2-1676877960377.png

Result:

vzhangti_3-1676877986622.png

Hope this method helps you.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.