How Do I Change Data Type From Text to Number in Power Bi?

//

Angela Bailey

When working with data in Power BI, it is important to ensure that the data types are correctly assigned. Sometimes, you may encounter a situation where the data type is set as text when it should actually be a number. In this tutorial, we will explore how to change the data type from text to number in Power BI.

Step 1: Open Power BI Desktop

To begin, open Power BI Desktop and load the dataset that contains the column with the incorrect data type.

Step 2: Identify the Column

Next, identify the specific column in your dataset that needs to be changed from text to number. You can easily identify this by looking at the column header or by examining the values within the column.

Step 3: Open Query Editor

Now, navigate to the Edit Queries option under Home tab and click on it. This will open up Query Editor, which allows you to make changes to your dataset.

Step 4: Select Transform Data

In Query Editor, select the column that you want to change from text to number by clicking on its header. Then, go to Transform tab and click on Data Type.

Step 5: Choose Number Data Type

A dialog box will appear with various options for changing the data type. In this case, select Number.

Note:

  • If you are unsure about which specific number type is appropriate for your data (e.g., whole numbers or decimal numbers), you can choose Decimal Number. This option allows for more flexibility in handling various number formats.
  • If you want to change the data type to an integer (whole number), you can select Whole Number.

Step 6: Apply Changes

After selecting the appropriate data type, click on the OK button to apply the changes. Power BI will automatically convert the selected column from text to number.

Step 7: Close and Apply

Once you have made all the necessary changes, click on the Close & Apply button in Query Editor. This will close Query Editor and apply the changes to your dataset in Power BI.

Congratulations!

You have successfully changed the data type from text to number in Power BI. Now you can perform calculations and aggregations on this column as needed.

Note: It is important to double-check your data after making any changes to ensure that it has been converted correctly. If any issues are detected, you can always go back to Query Editor and modify the data type accordingly.

By following these steps, you can easily change the data type from text to number in Power BI, allowing for more accurate analysis and visualization of your data.

Discord Server - Web Server - Private Server - DNS Server - Object-Oriented Programming - Scripting - Data Types - Data Structures

Privacy Policy