Back to all posts

DAX (Data Analysis Expressions) Operators and Data Type in Power BI

Here's the list of DAX operators in a table format: Arithmetic Operators Operator Description Example + Addition = + - Subtraction = - * Multiplication = *…

Here's the list of DAX operators in a table format:

Arithmetic Operators

OperatorDescriptionExample
+Addition= +
-Subtraction= -
*Multiplication= *
/Division= /
^Exponentiation= ^ 3

Comparison Operators

OperatorDescriptionExample
=Equal to= = "North"
<>Not equal to= <> "South"
>Greater than= > 500
<Less than= < 500
>=Greater than or equal to= >= 500
<=Less than or equal to= <= 500

Text Operators

OperatorDescriptionExample
&Concatenation= & " " &

Logical Operators

OperatorDescriptionExample
&&AND= > 500 && = "North"
||OR= > 500 || = "North"
NOTNOT= NOT( > 500)

Other Operators

OperatorDescriptionExample
INIn a specified list of values= IN {"North", "South"}
BLANKRepresents a blank value(NULL value)= IF(ISBLANK(), 0, )
TRUELogical constant for true= IF( > 500, TRUE(), FALSE())
FALSELogical constant for false= IF( <= 500, FALSE(), TRUE())

Operator Precedence

OrderOperators
1Exponentiation (^)
2Multiplication and division (*, /)
3Addition and subtraction (+, -)
4Comparison (=, <>, >, <, >=, <=)
5NOT (NOT)
6AND (&&)
7OR (`||')

Data types

In Power BI, data types are important for accurately representing and interpreting your data. Power BI supports various data types, including:

  1. Text: Used for alphanumeric characters, such as names, descriptions, or any other textual data.
  2. Whole Number (Integer): Used for integer numbers without decimal places.
  3. Decimal Number: Used for numbers with decimal places.
  4. Date/Time: Used for dates and times. Power BI has a special data type for Date/Time values, allowing for easy manipulation and visualization of temporal data.
  5. Boolean: Used for true/false or yes/no values.
  6. Currency: Similar to the decimal number data type but specifically formatted for monetary values.
  7. Percentage: A special data type used for representing percentages.
  8. Image URL: Used for storing URLs linking to images. Power BI can display images directly when provided with a valid URL.
  9. Geographical Data: Power BI also supports special data types for geographical data, such as latitude and longitude coordinates.

Keep building your data skillset

Explore more SQL, Python, analytics, and engineering tutorials.