Generally, when you load a table from any data source, Power BI automatically detects the data type of a column. However, there may be some situations where Power BI could go wrong.
For example, you can consider quantities, values, or even dates as text. In these situations, you can use the Power BI change data types of a column option. Let me show you how to change the data types of a column in Power BI with an example.
How to change the data types of a column in Power BI
To demonstrate this Change of data types of a column, we will use the Excel table that we imported in the article Enter data.
To change the data types of any column, click the Edit queries option under the Home tongue.


Clicking Edit queries The option opens a new window called Power BI Editor de Power Query.
In the screenshot below, you can see the Annual Revenue, Sales, and Hire Date columns loaded as text.

There are a couple of ways to change the data types of the columns.
First approach to change the data types of a column
Select the column for which you want to change the data type. Then click on the left corner of the column header (currently represents the ABC text)

Clicking on that position opens a drop-down list of supported data types. Select the type of data that suits your data. Here, we are selecting the integer.

Changing the data type of a column opens the following pop-up window. Click the Replace Current button.

Now you can see that the Annual Income heading shows 123 (integer), not ABC (text)

Second approach to change the data types of a column in Power BI
Select the name of the column in which you want to modify the data type and click the Data Type button on the Home tab

Shows you the drop-down list of available data types. For the purpose of demonstration, we are selecting a fixed decimal number.

This time we will select Add new step. It means that this type of change column is added as a new step in Applied Steps.

As you can see in the screenshot below, you changed the data type of the Sales column and added a new step under Applied Steps.

Third approach to change the data types of a column in Power BI
Select the column for which you want to change the data type and right-click to open the context menu. Select the Exchange rate and then the data type of the list. For now, we are selecting the integer.

Don't forget to hit the Close and apply option under the Home tab to apply these changes.