Change type

Defining column data types properly early on in your data scrubbing process can help to determine the type of values you are working with. The Power Query Editor has various numeric, text, and date-time data types for you to choose from. In our current example, all of the data types were automatically interpreted correctly by the Power Query Editor, but let's look at where you could change this if necessary:

  1. Locate the data type indicator on the column header to the right of the column name
  2. Click the data type icon, and a menu will open that allows you to choose the new data type you desire:

Choosing the Data type

Another method you can use for changing column data types is to right-click on the column you wish to change, then select Change Type and choose the new data type you desire.

If you want to change multiple column data types at once, you can multi-select the necessary columns, then select the new data type from the Data Type property under the Home ribbon.

Many of the transforms you will encounter in the future are contextually based on the column data types you are working with. For example, if you have a column that is a date then you will be provided special transforms that can only be executed against a date data type, such as extracting the month name from a date column.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.141.27