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
Anonymous
Not applicable

Extract Phone Country Code Dax Formula

Hello Community,

 

I am building a Power Bi report and need to extract the phone country code from a text string. Text string is as follow:

"John Adams (34860721035)"

In excel I developed the following formula: MID(A2, FIND("(",A2, 1)+1, 2) and would obtain 34 from the Text string above. Sometimes text string is only composed of a first name and numbers length can vary depending on the country.

 

Any idea how I could replicate the excel formula in Power Bi Dax?

 

Thanks in advance

 

Thank you very much.

1 REPLY 1
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

Generally, you may try DAX function 

LEFT(), LEN(), RIGHT()and MID() 

 

Regards,

Jimmy Tao

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