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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.