DAX Basics Flashcards

Learn DAX Basic Definitions

1
Q

How many groups of functions are there?

A

14

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Aggregation functions

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Date and time functions

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Filter functions

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Financial functions

A

These functions are used in formulas that perform financial calculations, such as net present value and rate of return.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Information functions

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Logical functions

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Math and Trig functions

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Other functions

A

These functions perform unique actions that cannot be defined by any of the categories most other functions belong to.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Parent and Child functions

A

These functions help users manage data that is presented as a parent/child hierarchy in their data models.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Relationship functions

A

These functions are for managing and utilizing relationships between tables. For example, you can specify a particular relationship to be used in a calculation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Statistical functions

A

These functions calculate values related to statistical distributions and probability, such as standard deviation and number of permutations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Table manipulation functions

A

These functions return a table or manipulate existing tables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Text functions

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Time intelligence functions

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

& (ampersand)

A

Connects, or concatenates, two values to produce one continuous text value [Region] & “, “ & [City]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

&& (double ampersand)

A

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”))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

|| (double pipe symbol)

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

IN

A

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” }

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

expression

A

Any DAX expression that returns a single scalar value, where the expression is to be evaluated multiple times (for each row/context).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

value

A

Any DAX expression that returns a single scalar value where the expression is to be evaluated exactly once before all other operations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

table

A

Any DAX expression that returns a table of data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

tableName

A

The name of an existing table using standard DAX syntax. It cannot be an expression.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

columnName

A

The name of an existing column using standard DAX syntax, usually fully qualified. It cannot be an expression.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

name

A

A string constant that will be used to provide the name of a new object.

26
Q

order

A

An enumeration used to determine the sort order.

27
Q

ties

A

An enumeration used to determine the handling of tie values.

28
Q

type

A

An enumeration used to determine the data type for PathItem and PathItemReverse.

29
Q

DEFINE

A

(Keyword) Introduces one or more entity definitions that can be applied to one or more EVALUATE statements.

30
Q

EVALUATE

A

(Keyword) Introduces a statement containing a table expression required to execute a DAX query.

31
Q

MEASURE

A

(Keyword) Introduces a measure definition that can be used in one or more EVALUATE statements in a query.

32
Q

ORDER BY

A

(Keyword) Introduces a statement that defines the sort order of query results returned by an EVALUATE statement.

33
Q

START AT

A

(Keyword) Introduces a statement that defines the starting value at which the query results of an ORDER BY statement are returned.

34
Q

VAR

A

(Keyword) Stores the result of an expression as a named variable, which can then be passed as an argument to other measure expressions.

35
Q

Analytic query

A

Power BI visuals query a data model by using ananalytic query. An analytic query strives to reduce potentially large data volumes and model complexities using three distinct phases: Filter, group and summarize. An analytic query is created automatically when fields are assigned to the wells of report visuals. Report authors can control the behavior of field assignments by renaming fields, modifying the summarization technique, or disabling summarization to achieve grouping. At report design time, filters can be added to the report, a report page, or a visual. In reading view, filters can be modified in theFilterspane, or by interactions with slicers and other visuals (cross-filtering).

36
Q

BLANK

A

DAX defines the absence of a value as BLANK. It’s the equivalent of SQL NULL, but it doesn’t behave exactly the same. It’s more closely aligned to Excel and how it defines an empty cell. BLANK is evaluated as zero or an empty string when combined with other operations. For example, BLANK + 20 = 20. Always use capital letters; the plural is BLANKs, with a lowercase “s”.

37
Q

Calculated column

A

A model calculation used to add a column to a tabular model by writing a DAX formula. The formula must return a scalar value, and it’s evaluated for each row in the table. A calculated column can be added to an Import or DirectQuery storage mode table.

38
Q

Calculated measure

A

In tabular modeling, there’s no such concept as acalculated measure. Usemeasureinstead. The wordcalculatedis used to describe calculated tables and calculated columns. It distinguishes them from tables and columns that originate from Power Query. Power Query doesn’t have the concept of a measure.

39
Q

Calculated table

A

A model calculation used to add a table to a tabular model by writing a DAX formula. The formula must return a table object. It results in a table that uses Import storage mode.

40
Q

Calculation

A

A deliberate process that transforms one or more inputs into one or more results. In a tabular data model, a calculation can be a model object; either a calculated table, calculated column, or measure.

41
Q

Context

A

Describes the environment in which a DAX formula is evaluated. There are two types of context:Row contextandfilter context. Row context represents the “current row”, and is used to evaluate calculated column formulas and expressions used by table iterators. Filter context is used to evaluate measures, and it represents filters applied directly to model columns and filters propagated by model relationships.

42
Q

DAX

A

Data Analysis Expressions (DAX) language is a formula language for Power Pivot in Excel, Power BI, Azure Analysis Services, and tabular modeling in SQL Server Analysis Services. You can also use DAX to add data model calculations and define row-level security (RLS) rules.

43
Q

Dynamic security

A

When row-level security (RLS) rules are enforced by using the identity of the report user. Rules filter model tables by using the user’s account name, which can be done with the USERNAME or USERPRINCIPALNAME functions. SeeRow-level security.

44
Q

Expression

A

A unit of DAX logic that’s evaluated and returns a result. Expressions can declare variables in which case they’re assigned a sub-expression and must include a RETURN statement that outputs a final expression. Expressions are constructed by using model objects (tables, columns, or measures), functions, operators, or constants.

45
Q

Field

A

Data model resource presented in theFieldspane. Fields are used to configure report filters and visuals. Fields consist of model columns, hierarchy levels, and measures.

46
Q

Formula

A

One or more DAX expressions used to define a model calculation. Inner expressions are called sub-expressions. Plural isformulas.

47
Q

Function

A

DAX functions have arguments that allow passing in parameters. Formulas can use many function calls, possibly nesting functions within other functions. In a formula, function names must be followed by parentheses. Within the parentheses, parameters are passed in.

48
Q

Implicit measure

A

An automatically generated calculation achieved by configuring a Power BI visual to summarize column values.Numericcolumns support the greatest range of summarization, including: Sum, Average, Minimum, Maximum, Count (Distinct), Count, Standard deviation, Variance, or Median. Columns of other data types can be summarized, too.Textcolumns can be summarized by using: First (alphabetically), Last (alphabetically), Count (Distinct), or Count.Datecolumns can be summarized by using: Earliest, Latest, Count (Distinct), or Count.Booleancolumns can be summarized by using: Count (Distinct), or Count.

49
Q

Iterator function

A

A DAX function that enumerates all rows of a given table and evaluate a given expression for each row. It provides flexibility and control over how model calculations summarize data.

50
Q

MDX

A

Multidimensional Expressions (MDX) language is a formula language for SQL Server Analysis Services multidimensional models (also known ascubes). MDX can be used to query tabular models, however it can’t define implicit measures. It can only query measures that are already defined in the model.

51
Q

Measure

A

A calculation that achieves summarization. Measures are eitherimplicitorexplicit. An explicit measure is a calculation added to a tabular data model by writing a DAX formula. A measure formula must return a scalar value. In theFieldspane, explicit measures are adorned with a calculator icon. Explicit measures are required when the model is queried by using Multidimensional Expressions (MDX), as is the case when using Analyze in Excel. An explicit measure is commonly just called a measure.

52
Q

Measure group

A

A model table that contains at least one measure, and has no hierarchies or visible columns. In theFieldspane, each measure group is adorned with a multi-calculator icon. Measure groups are listed together at the top of theFieldspane, and sorted alphabetically by name.

53
Q

Model calculation

A

A named formula that’s used to add a calculated table, calculated column, or measure to a tabular data model. Its structure is = . Most calculations are added by data modelers in Power BI Desktop, but measures can also be added to a live connection report. SeeReport measures.

54
Q

Quick measures

A

A feature in Power BI Desktop that eliminates the need to write DAX formulas for commonly defined measures. Quick measures include average per category, rank, and difference from baseline.

55
Q

Report measures

A

Also calledreport-level measures. They’re added to a live connection report in Power BI Desktop by writing a DAX formula, but only for connections to Power BI models or Analysis Services tabular models.

56
Q

Row-level security

A

Also calledRLS. Design technique to restrict access to subsets of data for specific users. In a tabular model, it’s achieved by creating model roles. Roles have rules, which are DAX expressions to filter table rows.

57
Q

Scalar

A

In DAX, a scalar is a single value. A scalar can be of any data type: Decimal, Integer, DateTime, String, Currency, Boolean. A scalar value can be the result of an expression calculated from multiple values. For example, an aggregation function such as MAX() returns a single maximum value from a set of values from which to evaluate.

58
Q

Summarization

A

An operation applied to the values of a column. Seemeasure.

59
Q

Time intelligence

A

Time intelligence relates to calculations over time, like year-to-date (YTD).

60
Q

Time intelligence function

A

DAX includes many time intelligence functions. Each time intelligence function achieves its result by modifying the filter context for date filters. Example functions: TOTALYTD and SAMEPERIODLASTYEAR.

61
Q

Value, values

A

Data to be visualized.

62
Q

What-if parameter

A

A Power BI Desktop feature that provides the ability to accept user input through slicers. Each parameter creates a single-column calculated table and a measure that returns a single-selected value. The measure can be used in model calculations to respond to the user’s input.