Fact column data types

It's essential that the numeric columns of fact tables are assigned to the appropriate data types. All integer columns, such as Order Quantity, should be stored as a whole number data type, and decimal numbers will be stored as either fixed decimal numbers or as decimal numbers. If four decimal places is sufficient precision, a Fixed decimal number type should be used to avoid rounding errors and the additional storage and performance costs of the decimal number type.

In the following screenshot, the Freight column is stored as a Fixed decimal number type and, thus, despite a format of six decimal places, only four significant digits are displayed to the right of the decimal place: 

Fixed decimal number data type

Dataset designers should check the numeric columns of fact tables and ensure that the appropriate data type has been assigned for each column. For example, certain scientific columns may require the deep precision available for decimal number types (15 significant digits), while accounting or financial columns generally need to be exact and thus the internal (19, 4) data type of a Fixed decimal number type is appropriate. Note that the result of aggregated expressions against this fixed decimal column will be a number of the same type and, therefore, to avoid overflow calculation errors, will also need to fit the (19, 4) data type. The Data types section in Chapter 2Connecting to Sources and Transforming Data with M provides details on the relationship between M data types and data types in the Data Model, as well as the function for converting column types in M Queries. 

The Data View from the Fixed decimal number data type image is not available for DirectQuery datasets. For DirectQuery datasets, the data types of columns should be set and managed at the data source table level such that Power BI only reflects these types. Revising data types during report query execution, either via SQL views in the data source or the M Queries in Power BI, can significantly degrade the performance of DirectQuery datasets.

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

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