0% found this document useful (0 votes)
12 views6 pages

DAX Data Types

The document outlines various DAX data types used in Power BI and Power Pivot, including Integer, Decimal, Currency, DateTime, Boolean, String, Variant, and Binary, along with their corresponding conventional data types. It also details the operators available in DAX for arithmetic, comparison, text concatenation, and logical operations. Each data type and operator is accompanied by examples to illustrate their usage.

Uploaded by

mustafa93hammad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views6 pages

DAX Data Types

The document outlines various DAX data types used in Power BI and Power Pivot, including Integer, Decimal, Currency, DateTime, Boolean, String, Variant, and Binary, along with their corresponding conventional data types. It also details the operators available in DAX for arithmetic, comparison, text concatenation, and logical operations. Each data type and operator is accompanied by examples to illustrate their usage.

Uploaded by

mustafa93hammad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

DAX Data Types

DAX Power BI Power Pivot and Correspondent Tabular Object


Data Data Analysis Conventional Model (TOM)
Type Type Services Data Type Data Type
Data Type (e.g., SQL
Server)
Integer Whole Number Whole Number Integer / INT int64

Decimal Decimal Decimal Floating point / double


Number Number DOUBLE

Currency Fixed Decimal Currency Currency / decimal


Number MONEY

DateTime DateTime, Date Date / dateTime


Date, DATETIME
Time
DAX Data Types
DAX Power BI Power Pivot and Correspondent Tabular Object
Data Data Analysis Conventional Model (TOM)
Type Type Services Data Type Data Type
Data Type (e.g., SQL
Server)
Boolean True/False True/False Boolean / BIT boolean

String Text Text String/NVARCH string


AR(MAX)

Variant - - - Variant

Binary Binary Binary Blob/VARBINAR Binary


Y(MAX)
DAX Data Types
Integer
DAX has only one Integer data type that can store a 64-bit value. All the internal calculations between
integer values in DAX also use a 64-bit value.

Decimal
A Decimal number is always stored as a double-precision floating-point value. Do not confuse this
DAX data type with the decimal and numeric data type of Transact-SQL. The corresponding data type
of a DAX decimal number in SQL is Float.

Currency
The Currency data type, also known as Fixed Decimal Number in Power BI, stores a fixed decimal
number. It can represent four decimal points and is internally stored as a 64-bit integer value divided by
10,000. Summing or subtracting Currency data types always ignores decimals beyond the fourth
decimal point, whereas multiplication and division produce a floating-point value, thus increasing the
precision of the result. In general, if we need more accuracy than the four digits provided, we must use a
Decimal data type.
The default format of the Currency data type includes the currency symbol. We can also apply the
currency formatting to Integer and decimal numbers, and we can use a format without the currency
symbol for a Currency data type.

DateTime
DAX stores dates as a DateTime data type. This format uses a floating-point number internally, wherein
the integer corresponds to the number of days since December 30, 1899, and the decimal part identifies
the fraction of the day. Hours, minutes, and seconds are converted to decimal fractions of a day.
DAX Data Types
Boolean
The Boolean data type is used to express logical conditions.
You will also see Boolean data types as numbers where TRUE equals 1 and FALSE equals 0. This
notation sometimes proves useful for sorting purposes because TRUE > FALSE.
String
Every string in DAX is stored as a Unicode string, where each character is stored in 16 bits. By default,
the comparison between strings is not case sensitive, so the two strings “Power BI” and “POWER BI”
are considered equal.
Variant
The Variant data type is used for expressions that might return different data types, depending on the
conditions.
The Variant data type cannot be used as a data type for a column in a regular table. A DAX measure,
and in general, a DAX expression can be Variant.
Binary
The Binary data type is used in the data model to store images or other nonstructured types of
information. It is not available in DAX. It was mainly used by Power View, but it might not be available
in other tools such as Power BI.
DAX Operators
Operator Type Symbol Use Example
Parenthesis () Precedence order and (5 + 2) * 3
grouping of arguments
Arithmetic + Addition 4+2
− Subtraction/negation 5−3
* Multiplication 4*2
/ Division 4/2
Comparison = Equal to [CountryRegion] =“USA”
<> Not equal to [CountryRegion] <>“USA”
> Greater than [Quantity] > 0
>= Greater than or equal to [Quantity] >= 100
< Less than [Quantity] < 0
<= Less than or equal to [Quantity] <= 100
Text & Concatenation of strings “Value is” & [Amount]
Concatenation
DAX Operators
Operator Type Symbol Use Example
Logical && AND condition between [CountryRegion] = “USA”
|| two Boolean &&
IN expressions [Quantity]>0
NOT OR condition between [CountryRegion] = “USA”
two Boolean ||
expressions [Quantity] > 0
Inclusion of an element in [CountryRegion] IN {“USA”,
a list “Canada”}
Boolean negation NOT [Quantity] > 0

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy