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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
AJAyr
New Member

extract 6-7 digit code from a column into a new column

Hi all,
I am needing help to extract 6-7 alphanumeric digit code from a column where there are multiple codes in a row without any specific  format.I need to create new column for the extracted code.Would you be able to help me.

Thanks in advance

4 REPLIES 4
Thennarasu_R
Responsive Resident
Responsive Resident

Hi @AJAyr 

You could use this Dax .

Column =Left(Column Name , 7)
If you want left side first 7 digits you should use Left Function.
Column = Right (Column Name , 7)
If you want Right  side first 7 digits you should use Right Function.

Thanks,
Thennarasu

Thank you. But, I need to extract 4 different 7 digit unique codes to a new column

 

Hi @AJAyr 
Can you share the data sample with required output? We'll get better understanding by looking at input and output

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
Anonymous
Not applicable

annayr_0-1677805144380.pngannayr_1-1677805153572.png

Hi, this is an example of my output.The output varies but different rows it's a string with alphabets and number and it can be 6 or 7 digits.varies in different rows.Hope it helps

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors