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

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

Reply
Anonymous
Not applicable

Formatting phone numbers (remove both hyphen and parenthesis)

For my report, I need to format my phone numbers in a way different than a lot of other people - I need the dashes and parentheses removed from the numbers currently being displayed.

Currently, my phone numbers are formatted as (999)999-9999 or 999-999-9999.

I need them to just say 9999999999. 

I used the substitute function to remove the -, which worked, but am having a lot of trouble when it comes to removing either of the parenthesis as DAX sees this as my trying to execute another function. Does anyone have any suggestions that will allow me to remove both the - and the () in phone numbers? 

3 REPLIES 3
Anonymous
Not applicable

This is the current formual I have been using: 

Customer Phone = SUBSTITUTE(Substitute('Report'[Customer Phone], "-", ""), "(","")

@Anonymous , why bother to format string with DAX? Power Query is born for such tasks,

Text.Select("Any String", {"0".."9"})

Screenshot 2021-03-04 233843.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Anonymous
Not applicable

Thank you, but unfortunately due to the nature of the data being used, I do not have access to the SQL server that would allow me to transform the data. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.