DAX Basics Flashcards
Learn DAX Basic Definitions
How many groups of functions are there?
14
Aggregation functions
These functions calculate a (scalar) value such as count, sum, average, minimum, or maximum for all rows in a column or table as defined by the expression.
Date and time functions
These functions in DAX are similar to date and time functions in Microsoft Excel. However, DAX functions are based on the datetime data types used by Microsoft SQL Server.
Filter functions
These functions help you return specific data types, look up values in related tables, and filter by related values. Lookup functions work by using tables and relationships between them. Filtering functions let you manipulate data context to create dynamic calculations.
Financial functions
These functions are used in formulas that perform financial calculations, such as net present value and rate of return.
Information functions
These functions look at a table or column provided as an argument to another function and returns whether the value matches the expected type. For example, the ISERROR function returns TRUE if the value you reference contains an error.
Logical functions
These functions return information about values in an expression. For example, the TRUE function lets you know whether an expression that you are evaluating returns a TRUE value.
Math and Trig functions
Mathematical functions in DAX are similar to Excel’s mathematical and trigonometric functions. However, there are some differences in the numeric data types used by DAX functions.
Other functions
These functions perform unique actions that cannot be defined by any of the categories most other functions belong to.
Parent and Child functions
These functions help users manage data that is presented as a parent/child hierarchy in their data models.
Relationship functions
These functions are for managing and utilizing relationships between tables. For example, you can specify a particular relationship to be used in a calculation.
Statistical functions
These functions calculate values related to statistical distributions and probability, such as standard deviation and number of permutations.
Table manipulation functions
These functions return a table or manipulate existing tables.
Text functions
With these functions, you can return part of a string, search for text within a string, or concatenate string values. Additional functions are for controlling the formats for dates, times, and numbers.
Time intelligence functions
These functions help you create calculations that use built in knowledge about calendars and dates. By using time and date ranges in combination with aggregations or calculations, you can build meaningful comparisons across comparable time periods for sales, inventory, and so on.
& (ampersand)
Connects, or concatenates, two values to produce one continuous text value [Region] & “, “ & [City]
&& (double ampersand)
Creates an AND condition between two expressions that each have a Boolean result. If both expressions return TRUE, the combination of the expressions also returns TRUE; otherwise the combination returns FALSE. ([Region] = “France”) && ([BikeBuyer] = “yes”))
|| (double pipe symbol)
Creates an OR condition between two logical expressions. If either expression returns TRUE, the result is TRUE; only when both expressions are FALSE is the result FALSE.
IN
Creates a logical OR condition between each row being compared to a table. Note: the table constructor syntax uses curly braces. ‘Product’[Color] IN { “Red”, “Blue”, “Black” }
expression
Any DAX expression that returns a single scalar value, where the expression is to be evaluated multiple times (for each row/context).
value
Any DAX expression that returns a single scalar value where the expression is to be evaluated exactly once before all other operations.
table
Any DAX expression that returns a table of data.
tableName
The name of an existing table using standard DAX syntax. It cannot be an expression.
columnName
The name of an existing column using standard DAX syntax, usually fully qualified. It cannot be an expression.