How To Format Phone Numbers In Power BI

Overview

In this article, we will learn how we can apply formatting to a phone number column in Power BI.

I have used an approach of a calculated column with FORMAT() DAX expression.

At the end of the article, we will convert the phone number format like this. I also have uploaded sample files for your practice.

 

Now, let's elaborate.

Convert Text Datatype to Whole Number Datatype

Most of us have “Text” Datatype with the column "Phone Number" in Power BI.
The first step is, to convert this "Text" data type to "Whole Number".

To convert "Text" datatype to "Whole Number" follow the below steps.

  1. Select the Column and Go to Modelling Tab.

  2. From Datatype, select the Whole Number.
 

Apply DAX Expression

Now, let’s create one calculated column,

  1. I have used the following DAX Expression to format the Phone Number.
    1. FormattedPhoneNumber = FORMAT(Sheet1[Phone Number],"###-###-####")  
    Now, let’s elaborate on this function in detail.

    Syntax
    FORMAT(VALUE, FORMAT)

     

    Here, Value = Name of the column

    Format= Format for the Phone Number
     
  2. Now, we are able to Format the Phone Number like this,


  3. Let’s apply it to our table and here is the result!
 

Conclusion

This is how we can format a Phone Number in Power BI. Isn’t it easy?


Similar Articles