SQL Server DAX Data Types and Operators

Overview

Data types and operators are basic units of storage and navigation in any functional / programming language. DAX also contains a small set of data types and operators. In this chapter we will briefly list all the data types and operators available in DAX.

Explanation

Below is a list of data types and operators available in DAX.

Data Types in DAX

  • Whole Number – Positive or negative integers with no decimal places.
  • Decimal Number – Real numbers are numbers that can have decimal places up to 17 decimal digits.
  • Boolean – Either a True or False value.
  • Text – A Unicode character data string. Can be strings, numbers or dates represented in a text format.
  • Date – Dates and times in an accepted date-time representation. Valid dates are all dates after March 1, 1900.
  • Currency – Currency data type allows values with four decimal digits of fixed precision.
  • Blank – A blank is a data type in DAX that represents nulls.

Operators in DAX

  • Comparison operators (=, <>, <, <=, >, >=) – To compare values and return a logical TRUE/FALSE value.
  • Arithmetic operators (+, -, *, /) – To perform arithmetic calculations that return numeric values.
  • Text concatenation operators ( & ) – To join two or more text strings.
  • Logical operators (&&, ||) – To combine two or more expressions to return a single result.

Leave a Reply

Your email address will not be published. Required fields are marked *