Code never lies, comments sometimes do [Ron Jeffries]

Visitors Map

Follow on Twitter

@ZammaCode
Powered by Blogger.

Monday, June 19, 2023

Operators in DAX


  • Operators are used to create expressions.
  • There are four different types of operators in DAX.
    • Arithmetic Operators perform basic arithmetic calculations.
      • + (Addition)
      • – (Subtraction)
      • * (Multiplication)
      • / (Division)
      • ^ (Exponentiation)
    • Comparison Operators return true or false when used to compare two values.
      • = (Equal to)
      • == (Strict equal to)
      • > (Greater than)
      • < (Less than)
      • >= (Greater than or equal to)
      • <= (Less than or equal to)
      • <> (Not equal to)
All of the above comparison operators except ==, returns TRUE for the following
BLANK  = 0, BLANK = "", BLANK = FALSE
The == operator, returns TRUE when the two arguments have the same value or are both BLANK
    • Logical operators are used to merge two or more statements that result in either TRUE or FALSE when evaluated.
      • && (AND); returns true if all statements combined with && are true, else it returns false
      • || (OR); returns true if at least one of the statements combined with || is true, else it returns false
      • IN returns TRUE if a row of values exists or contained in a table, otherwise returns FALSE
    • Text Concatenation operator (&) concatenates two strings.

0 comments:

Post a Comment