
Unstructured sources such as Excel, CSV, and text files, Power Query automatically detects data types by inspecting the values in the table. Structured data sources such as databases, Power Query reads the table schema from the data source and automatically displays the data by using the correct data type for each column. We recommend that you always explicitly define the column data types for your queries from unstructured sources, and avoid having any columns with the Any data type as the output of your query.ĭata type detection occurs automatically when connecting to: Any is the data type that classifies all values.

The Any data type is the status given to a column that doesn't have an explicit data type definition. The Binary data type can be used to represent any other data with a binary format. Because it's a Decimal Number type, you can easily use it in visualizations that show magnitude. As a Decimal Number type, it can be added or subtracted from a Date/Time field with correct results. Represents a length of time, which is converted into a Decimal Number type when loaded into the model. It's converted into Date/Time when loaded into the model. Represents a UTC Date/Time with a time-zone offset.

When converted into the model, a Time value is the same as a Date/Time value with no digits to the left of the decimal place. When converted into the model, a Date is the same as a Date/Time value with zero for the fractional value. Represents just a date (no time portion). Dates between the years 19 are supported. The time portion of a date is stored as a fraction to whole multiples of 1/300 seconds (3.33 ms). Underneath the covers, the Date/Time value is stored as a Decimal Number type, so you can actually convert between the two. As with the Fixed Decimal Number type, the Whole Number type can be useful in cases where you need to control rounding.įundamentally the same as a Decimal Number type, but it has a mask to format the values in the column as a percentage in the Power Query Editor window. It can represent the largest possible precision of the various numeric data types. Because it's an integer, it has no digits to the right of the decimal place. Represents a 64-bit (eight-byte) integer value. Unlike Decimal Number, the Fixed Decimal Number type is always precise and is thus useful in cases where the imprecision of floating-point notation might introduce errors. The decimal separator always has four digits to its right and allows for 19 digits of significance. Thus, minor differences in precision might occur when representing certain decimal numbers.Īlso known as the Currency type, this data type has a fixed location for the decimal separator. Note that a binary floating-point number can't represent all numbers within its supported range with 100% accuracy. The Decimal Number type corresponds to how Excel stores its numbers. The decimal separator can occur anywhere in the number. The largest precision that can be represented in a Decimal Number type is 15 digits long. For example, numbers like 34, 34.01, and 34.000367063 are valid decimal numbers. The Decimal Number type can handle negative values from –1.79E +308 through –2.23E –308, 0, and positive values from 2.23E –308 through 1.79E + 308. Although designed to handle numbers with fractional values, it also handles whole numbers. It's the most common number type, and corresponds to numbers as you usually think of them. Represents a 64-bit (eight-byte) floating-point number.

Maximum string length is 268,435,456 Unicode characters (where each Unicode character is two bytes) or 536,870,912 bytes. Can be strings, numbers, or dates represented in a text format. Data typeĪ Unicode character data string. Although beyond the scope of this article, you can find the complete list of data types in the Power Query M formula language Types article. The most common data types used in Power Query are listed in the following table. These transformations and options occur throughout the Power Query interface, such as on the Transform and Add column tabs and the smart filter options. For example, when you select a column with a data type of Date, you get transformations and options that apply to that specific data type. Power Query provides a set of contextual transformations and options based on the data type of the column.
