Data types in Data Models (2024)

In a Data Model, each column has an associated data type that specifies the type of data the column can hold: whole numbers, decimal numbers, text, monetary data, dates and times, and so on. Data type also determines what kinds of operations you can do on the column, and how much memory it takes to store the values in the column.

If you’re using the Power Pivot add-in, you can change a column’s data type. You might need to do this if a date column was imported as a string, but you need it to be something else. For more information, see Set the data type of a column in Power Pivot.

In this article

Summary of data types

The following table lists data types supported in a Data Model. When you import data or use a value in a formula, even if the original data source contains a different data type, the data is converted to one of these data types. Values that result from formulas also use these data types.

Data type in Excel

Data type in DAX

Description

Whole Number

A 64 bit (eight-bytes) integer value 1, 2

Numbers that have no decimal places. Integers can be positive or negative numbers, but must be whole numbers between -9,223,372,036,854,775,808 (-2^63) and 9,223,372,036,854,775,807 (2^63-1).

Decimal Number

A 64 bit (eight-bytes) real number 1, 2

Real numbers are numbers that can have decimal places. Real numbers cover a wide range of values:

Negative values from -1.79E+308 through -2.23E-308

Zero

Positive values from 2.23E -308 through 1.79E + 308

However, the number of significant digits is limited to 15 decimal digits.

TRUE/FALSE

Boolean

Either a True or False value.

Text

String

A Unicode character data string. Can be strings, numbers or dates represented in a text format.

Maximum string length is 268,435,456 Unicode characters (256 mega characters) or 536,870,912 bytes.

Date

Date/time

Dates and times in an accepted date-time representation.

Valid dates are all dates after January 1, 1900.

Currency

Currency

Currency data type allows values between -922,337,203,685,477.5808 to 922,337,203,685,477.5807 with four decimal digits of fixed precision.

N/A

Blank

A blank is a data type in DAX that represents and replaces SQL nulls. You can create a blank by using the BLANK function, and test for blanks by using the logical function, ISBLANK.

1 DAX formulas do not support data types smaller than those listed in the table.

2 If you try to import data that has very large numeric values, import might fail with the following error:

In-memory database error: The '<column name>' column of the '<table name>' table contains a value, '1.7976931348623157e+308', which is not supported. The operation has been cancelled.

This error occurs because Power Pivot uses that value to represent nulls. The values in the following list are synonyms for the null value:

Value

9223372036854775807

-9223372036854775808

1.7976931348623158e+308

2.2250738585072014e-308

Remove the value from your data and try importing again.

Table Data Type

DAX uses a table data type in many functions, such as aggregations and time intelligence calculations. Some functions require a reference to a table; other functions return a table that can then be used as input to other functions. In some functions that require a table as input, you can specify an expression that evaluates to a table; for some functions, a reference to a base table is required. For information about the requirements of specific functions, see DAX Function Reference.

Implicit and explicit data type conversion in DAX formulas

Each DAX function has specific requirements as to the types of data that are used as inputs and outputs. For example, some functions require integers for some arguments and dates for others; other functions require text or tables.

If the data in the column you specify as an argument is incompatible with the data type required by the function, DAX in many cases will return an error. However, wherever possible DAX will attempt to implicitly convert the data to the required data type. For example:

  • You can type a date as a string, and DAX will parse the string and attempt to cast it as one of the Windows date and time formats.

  • You can add TRUE + 1 and get the result 2, because TRUE is implicitly converted to the number 1 and the operation 1+1 is performed.

  • If you add values in two columns, and one value happens to be represented as text ("12") and the other as a number (12), DAX implicitly converts the string to a number and then does the addition for a numeric result. The following expression returns 44: = "22" + 22

  • If you attempt to concatenate two numbers, Excel will present them as strings and then concatenate.The following expression returns "1234": = 12 & 34

The following table summarizes the implicit data type conversions that are performed in formulas. Excel performs implicit conversions whenever possible, as required by the specified operation.

Table of Implicit Data Conversions

The type of conversion that is performed is determined by the operator, which casts the values it requires before performing the requested operation. These tables list the operators, and indicate the conversion that is performed on each data type in the column when it is paired with the data type in the intersecting row.

Note:Text data types are not included in these tables. When a number is represented as in a text format, in some cases Power Pivot will attempt to determine the number type and represent it as a number.

Addition (+)

Operator (+)

INTEGER

CURRENCY

REAL

Date/time

INTEGER

INTEGER

CURRENCY

REAL

Date/time

CURRENCY

CURRENCY

CURRENCY

REAL

Date/time

REAL

REAL

REAL

REAL

Date/time

Date/time

Date/time

Date/time

Date/time

Date/time

For example, if a real number is used in an addition operation in combination with currency data, both values are converted to REAL, and the result is returned as REAL.

Subtraction (-)

In the following table the row header is the minuend (left side) and the column header is the subtrahend (right side).

Operator (-)

INTEGER

CURRENCY

REAL

Date/time

INTEGER

INTEGER

CURRENCY

REAL

REAL

CURRENCY

CURRENCY

CURRENCY

REAL

REAL

REAL

REAL

REAL

REAL

REAL

Date/time

Date/time

Date/time

Date/time

Date/time

For example, if a date is used in a subtraction operation with any other data type, both values are converted to dates, and the return value is also a date.

Note:Data models also supports the unary operator, - (negative), but this operator does not change the data type of the operand.

Multiplication (*)

Operator (*)

INTEGER

CURRENCY

REAL

Date/time

INTEGER

INTEGER

CURRENCY

REAL

INTEGER

CURRENCY

CURRENCY

REAL

CURRENCY

CURRENCY

REAL

REAL

CURRENCY

REAL

REAL

For example, if an integer is combined with a real number in a multiplication operation, both numbers are converted to real numbers, and the return value is also REAL.

Division (/)

In the following table the row header is the numerator and the column header is the denominator.

Operator (/)

(Row/Column)

INTEGER

CURRENCY

REAL

Date/time

INTEGER

REAL

CURRENCY

REAL

REAL

CURRENCY

CURRENCY

REAL

CURRENCY

REAL

REAL

REAL

REAL

REAL

REAL

Date/time

REAL

REAL

REAL

REAL

For example, if an integer is combined with a currency value in a division operation, both values are converted to real numbers, and the result is also a real number.

Comparison operators

In comparison expressions Boolean values are considered greater than string values and string values are considered greater than numeric or date/time values; numbers and date/time values are considered to have the same rank. No implicit conversions are performed for Boolean or string values; BLANK or a blank value is converted to 0/""/false depending on the data type of the other compared value.

The following DAX expressions illustrate this behavior:

=IF(FALSE()>"true","Expression is true", "Expression is false"), returns "Expression is true"

=IF("12">12,"Expression is true", "Expression is false"), returns "Expression is true".

=IF("12"=12,"Expression is true", "Expression is false"), returns "Expression is false"

Conversions are performed implicitly for numeric or date/time types as described in the following table:

Comparison Operator

INTEGER

CURRENCY

REAL

Date/time

INTEGER

INTEGER

CURRENCY

REAL

REAL

CURRENCY

CURRENCY

CURRENCY

REAL

REAL

REAL

REAL

REAL

REAL

REAL

Date/time

REAL

REAL

REAL

Date/time

Top of Page

Handling blanks, empty strings, and zero values

In DAX, a null, blank value, empty cell, or a missing value are all represented by the same new value type, a BLANK. You can also generate blanks by using the BLANK function, or test for blanks by using the ISBLANK function.

How blanks are handled in operations, such as addition or concatenation, depends on the individual function. The following table summarizes the differences between DAX and Microsoft Excel formulas, in the way that blanks are handled.

Expression

DAX

Excel

BLANK + BLANK

BLANK

0 (zero)

BLANK +5

5

5

BLANK * 5

BLANK

0 (zero)

5/BLANK

Infinity

Error

0/BLANK

NaN

Error

BLANK/BLANK

BLANK

Error

FALSE OR BLANK

FALSE

FALSE

FALSE AND BLANK

FALSE

FALSE

TRUE OR BLANK

TRUE

TRUE

TRUE AND BLANK

FALSE

TRUE

BLANK OR BLANK

BLANK

Error

BLANK AND BLANK

BLANK

Error

For details on how a particular function or operator handles blanks, see the individual topics for each DAX function, in the section, DAX Function Reference.

Top of Page

Data types in Data Models (2024)

FAQs

What are the four different types of data models? ›

The predominant data modeling types are hierarchical, network, relational, and entity-relationship. These models help teams to manage data and convert them into valuable business information.

What is data types and types of data types in data structure? ›

What is a data type?
Data typeUsed forExamples
IntegerWhole numbers7 12 999
Float (floating point)Numbers with a decimal point3.15 9.06 00.13
CharacterEncoding text numerically97 (in ASCII, 97 indicates a lowercase a)
BooleanRepresenting logical valuesTRUE FALSE
1 more row

What are the 5 types of data in Excel with examples? ›

Summary table
Data TypeDescription
NumberValues including large numbers, small fractions, and more.
CurrencyMonetary values with currency symbols and decimal places.
Date and TimeStores dates and times for chronological analysis and calculations.
PercentageConverts numbers into percentages for ratio and proportional values.
8 more rows

What are the types of tables in a data model? ›

Ralph Kimball's dimensional data modeling technique classifies data models into two types of tables: fact tables and dimension tables.

What are the 4 main data types? ›

4 Types Of Data- Nominal, Ordinal, Discrete And Continuous.

What are the four 4 types of data classification define each? ›

Depending on the sensitivity of the data an organization holds, there needs to be data classification levels to determine elements including who has access to that data and how long the data needs to be retained. Typically, there are four classifications for data: public, internal-only, confidential, and restricted.

What are the 5 different data types? ›

Data types
  • String (or str or text). Used for a combination of any characters that appear on a keyboard, such as letters, numbers and symbols.
  • Character (or char). Used for single letters.
  • Integer (or int). Used for whole numbers.
  • Float (or Real). ...
  • Boolean (or bool).

What are the 4 basic data types in Excel? ›

4 Excel data types
  • Number data. Data is this category includes any kind of number. ...
  • Text data. This kind of data includes characters such as alphabetical, numerical and special symbols. ...
  • Logical data. Data in this type is either TRUE or FALSE, usually as the product of a test or comparison. ...
  • Error data.
Sep 22, 2023

What are the five example of data type? ›

Discussion
Data TypeRepresentsExamples
integerwhole numbers-5 , 0 , 123
floating point (real)fractional numbers-87.5 , 0.0 , 3.14159
stringA sequence of characters"Hello world!"
Booleanlogical true or falsetrue , false
1 more row

What are the four common types of data tables? ›

The most typical table format is that of individuals (rows) and variables (columns). However, the individuals-variables layout is not the only type of setting; there are other types of tables like contingency tables, crosstabulations, distance tables, as well as similarity and proximity tables.

What are the data types in a data table? ›

DataTables has a number of built in types which are automatically detected:
  • date - Date / time values. ...
  • num - Simple number sorting. ...
  • num-fmt - Numeric sorting of formatted numbers. ...
  • html-num - As per the num option, but with HTML tags also in the data.

What are the 4 types of models in modeling and simulation? ›

Data analytics professionals should know these four types of simulation models:
  • Monte Carlo method.
  • Agent-based modeling.
  • Discrete event simulation.
  • System dynamic modeling.
Mar 13, 2023

What are the four main types of big data models? ›

Big data technologies can be categorized into four main types: data storage, data mining, data analytics, and data visualization [2]. Each of these is associated with certain tools, and you'll want to choose the right tool for your business needs depending on the type of big data technology required.

What are the four basic components of a data model? ›

What Are the Key Data Model Components?
  • Entities are the objects we want to represent in our data model and are usually represented by a table. ...
  • Attributes appear as columns in specific tables. ...
  • Records are shown in rows in each table. ...
  • Relationships define the associations between entities.
Apr 4, 2023

Top Articles
Your Guide to the Life & Health Insurance Exam
Cost of living in Japan – single, family & student
What Is Single Sign-on (SSO)? Meaning and How It Works? | Fortinet
Roblox Roguelike
Best Team In 2K23 Myteam
Shs Games 1V1 Lol
25X11X10 Atv Tires Tractor Supply
Hay day: Top 6 tips, tricks, and cheats to save cash and grow your farm fast!
Becky Hudson Free
Gt Transfer Equivalency
What Does Dwb Mean In Instagram
MindWare : Customer Reviews : Hocus Pocus Magic Show Kit
Tracking Your Shipments with Maher Terminal
Apne Tv Co Com
Hanger Clinic/Billpay
The best TV and film to watch this week - A Very Royal Scandal to Tulsa King
Byui Calendar Fall 2023
Petco Vet Clinic Appointment
Exterior insulation details for a laminated timber gothic arch cabin - GreenBuildingAdvisor
Melissababy
Best Transmission Service Margate
Reser Funeral Home Obituaries
پنل کاربری سایت همسریابی هلو
Suspiciouswetspot
Spectrum Outage in Queens, New York
Narragansett Bay Cruising - A Complete Guide: Explore Newport, Providence & More
Mark Ronchetti Daughters
Home Auctions - Real Estate Auctions
35 Boba Tea & Rolled Ice Cream Of Wesley Chapel
Rock Salt Font Free by Sideshow » Font Squirrel
Xfinity Outage Map Lacey Wa
123Moviestvme
Maybe Meant To Be Chapter 43
No Hard Feelings Showtimes Near Tilton Square Theatre
Property Skipper Bermuda
Google Chrome-webbrowser
Tirage Rapid Georgia
Koninklijk Theater Tuschinski
Red Dead Redemption 2 Legendary Fish Locations Guide (“A Fisher of Fish”)
Improving curriculum alignment and achieving learning goals by making the curriculum visible | Semantic Scholar
Carteret County Busted Paper
Grand Valley State University Library Hours
Borat: An Iconic Character Who Became More than Just a Film
Dobratz Hantge Funeral Chapel Obituaries
Pas Bcbs Prefix
Star Sessions Snapcamz
Westport gun shops close after confusion over governor's 'essential' business list
Jigidi Jigsaw Puzzles Free
Parks And Rec Fantasy Football Names
How to Find Mugshots: 11 Steps (with Pictures) - wikiHow
Generator für Fantasie-Ortsnamen: Finden Sie den perfekten Namen
Latest Posts
Article information

Author: Msgr. Benton Quitzon

Last Updated:

Views: 6306

Rating: 4.2 / 5 (43 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Msgr. Benton Quitzon

Birthday: 2001-08-13

Address: 96487 Kris Cliff, Teresiafurt, WI 95201

Phone: +9418513585781

Job: Senior Designer

Hobby: Calligraphy, Rowing, Vacation, Geocaching, Web surfing, Electronics, Electronics

Introduction: My name is Msgr. Benton Quitzon, I am a comfortable, charming, thankful, happy, adventurous, handsome, precious person who loves writing and wants to share my knowledge and understanding with you.