cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

@Dim24 ,

 

Generally, you may try DAX function 

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

 

Regards,

Jimmy Tao

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

@Dim24 ,

 

Generally, you may try DAX function 

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

 

Regards,

Jimmy Tao

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors