Common DAX Functions:
  1. Aggregation Functions:

    • SUM(): Sums the values in a column.
      • Example: SUM(Sales[Amount])
    • AVERAGE(): Calculates the average of values in a column.
      • Example: AVERAGE(Sales[Amount])
    • COUNT(), COUNTA(), COUNTROWS(): Count the number of rows, values, or non-empty values.
    • MIN(), MAX(): Returns the minimum or maximum value of a column.
  2. Logical Functions:

    • IF(): Performs a logical test and returns different values based on the result.
      • Example: IF(Sales[Amount] > 1000, "High", "Low")
    • AND(), OR(), NOT(): Logical functions for combining conditions.
  3. Date and Time Functions:

    • TODAY(): Returns the current date.
    • YEAR(), MONTH(), DAY(): Extract specific parts of a date.
    • DATEDIFF(): Calculates the difference between two dates.
    • DATEADD(): Shifts a date by a specified number of periods.
  4. Filter Functions:

    • FILTER(): Returns a table that has been filtered according to a specified expression.
      • Example: FILTER(Sales, Sales[Amount] > 1000)
    • ALL(): Removes filters from a table or column.
      • Example: ALL(Sales[Product]) removes any filters on the Product column.
    • CALCULATE(): Modifies the context in which a calculation is performed.
      • Example: CALCULATE(SUM(Sales[Amount]), Sales[Region] = "North")
  5. Ranking and Windowing Functions:

    • RANKX(): Ranks items based on a given expression.
      • Example: RANKX(ALL(Sales[Product]), SUM(Sales[Amount]))
    • TOPN(): Returns the top N rows of a table based on a given expression.
  6. Text Functions:

    • CONCATENATE(): Joins two text strings together.
    • LEFT(), RIGHT(), MID(): Extracts specific parts of a string.
    • SEARCH(), FIND(): Finds the position of a substring within a string.
  7. Statistical Functions:

    • STDEV.P(), STDEV.S(): Standard deviation calculations.
    • VAR.P(), VAR.S(): Variance calculations.
  8. Time Intelligence Functions:

    • Predefined time periods: DAX has built-in functions for time-based calculations. Examples:
      • SAMEPERIODLASTYEAR(): Compares the current period to the same period in the previous year.
      • PARALLELPERIOD(): Shifts a date range by a specified number of periods.
      • TOTALYTD(), TOTALQTD(), TOTALMTD(): Total Year-to-Date, Quarter-to-Date, and Month-to-Date calculations.