DAX Functions Flashcards

1
Q

APPROXIMATEDISTINCTCOUNT(‘Sales’[Product])

A

This DAX code estimates the count of unique values in the ‘Product’ column of the ‘Sales’ table. The ‘APPROXIMATEDISTINCTCOUNT’ function provides a faster estimate of distinct values compared to ‘DISTINCTCOUNT’.

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

AVERAGE(‘Sales’[SalesAmount])

A

Calculates the arithmetic mean of a column that contains numeric values.

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

AVERAGEA(‘Sales’[SalesAmount])

A

The AVERAGEA function in DAX calculates the arithmetic mean (average) of a column, including text and logical values in the calculation. Text is considered as 0 and logical values are considered as 1 (TRUE) or 0 (FALSE).

  1. Treat all non-blank numeric values in SalesAmount as their numeric value.
  2. Treat all text values in SalesAmount as 0.
  3. Treat all TRUE logical values as 1, and FALSE as 0.
  4. Calculate the average of these values.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

AVERAGEX(‘Sales’, [SalesAmount] * [Quantity])

A

The AVERAGEX function in DAX is an iterator that calculates the average (arithmetic mean) of an expression evaluated over a table. It’s different from AVERAGE because it allows for a much more dynamic calculation that can include not just the contents of a column, but also the result of a calculation based on multiple columns for each row.

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

COUNT(‘Sales’[CustomerID])

A

The COUNT function in DAX is used to count the number of rows in a column that contain non-blank values. It’s important to note that COUNT only works with numeric data and will not count text or other non-numeric values. If you need to count rows with non-numeric data, you would use COUNTA

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

COUNTA(‘Sales’[CustomerName])

A

The COUNTA function in DAX counts the number of non-empty values in a column, including numbers, text, or any other type of data. It does not count blank or null values.

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

COUNTAX(‘Sales’, [SalesAmount] > 100)

A

The COUNTAX function in DAX is used to count non-blank results when evaluating an expression over a table. Unlike COUNT and COUNTA, which operate directly on a single column, COUNTAX applies a given expression to each row of a table and then counts the number of times that expression evaluates to a non-blank result.

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

COUNTBLANK(‘Sales’[DiscountAmount])

A

The COUNTBLANK function in DAX is used to count the number of blank or null values in a specified column. This function is particularly useful for identifying how many entries in a column are missing or have not been recorded.

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

COUNTROWS(‘Sales’)

A

The COUNTROWS function in DAX is used to count the number of rows in a table or in a table expression. It’s a straightforward way to determine the total number of entries (or records) in a given table.

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

COUNTX(‘Sales’, [SalesAmount] > 100)

A

The COUNTX function in DAX is an iterator function that counts the number of rows in a table where an expression evaluates to a non-blank result. It’s particularly useful when you want to apply a condition to each row of a table and count the number of rows that meet this condition.

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

DISTINCTCOUNT(‘Sales’[Product])

A

The DISTINCTCOUNT function in DAX counts the number of unique values in a column. It’s commonly used to determine the cardinality of categorical data.

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

DISTINCTCOUNTNOBLANK(‘Sales’[Product])

A

The DISTINCTCOUNTNOBLANK function in DAX is similar to DISTINCTCOUNT but it excludes blank values from the count of unique values in a column.

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

MAX(‘Sales’[SalesAmount])

A

The MAX function in DAX identifies the largest numeric value in a column. It’s useful for finding the maximum value in a range of numbers.

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

MAXA(‘Sales’[OrderDate])

A

The MAXA function in DAX evaluates both numeric and non-numeric values (including text represented as numbers and logical values) to find the largest value in a column.

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

MAXX(‘Sales’, [SalesAmount] * [Quantity])

A

The MAXX function in DAX is an iterator that evaluates an expression for each row in a table and returns the largest result. It allows for complex calculations that can involve multiple columns.

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

MIN(‘Sales’[SalesAmount])

A

The MIN function in DAX finds the smallest numeric value in a column. It is typically used to identify the minimum value in a dataset.

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

MINA(‘Sales’[OrderDate])

A

The MINA function in DAX works like MAXA but returns the smallest value in a column, considering all types of values including text and logicals.

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

MINX(‘Sales’, [SalesAmount] * [Quantity])

A

The MINX function in DAX evaluates an expression for each row in a table and returns the smallest result. It is an iterator that can handle complex row-by-row calculations.

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

PRODUCT(‘Sales’[Quantity])

A

The PRODUCT function in DAX multiplies all the numbers in a column and returns the total product. It’s useful for calculating cumulative product values.

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

PRODUCTX(‘Sales’, [SalesAmount] * [Quantity])

A

The PRODUCTX function in DAX is an iterator that calculates the product of an expression evaluated for each row in a table. This function can perform row-context-specific multiplications before aggregating the result.

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

SUM(‘Sales’[SalesAmount])

A

The SUM function in DAX adds all the numbers in a column, providing a total sum. It’s one of the most commonly used functions for basic aggregation.

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

SUMX(‘Sales’, [SalesAmount] * [Quantity])

A

The SUMX function in DAX sums up the results of an expression evaluated for each row in a table. It combines the flexibility of row-wise calculations with the simplicity of aggregation.

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

CALENDAR(DATE(2022,1,1), DATE(2022,12,31))

A

The CALENDAR function generates a table with a single column “Date” containing a contiguous set of dates between the specified start and end dates. In this example, it creates a calendar table for the year 2022.

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

CALENDARAUTO()

A

This function generates a calendar table with a single column “Date” containing a contiguous set of dates automatically determined by the data in your model. It doesn’t require explicit date range parameters.

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

DATE(2022, 2, 15)

A

The DATE function returns a datetime value for the specified year, month, and day. In this example, it creates a datetime value for February 15, 2022.

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

DATEDIFF(‘Sales’[OrderDate], ‘Sales’[ShipDate], DAY)

A

This function calculates the number of days between two dates. In this example, it calculates the number of days between the ‘OrderDate’ and ‘ShipDate’ columns in the ‘Sales’ table. The third argument specifies the interval as “DAY”.

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

DATEVALUE(“2022-01-31”)

A

The DATEVALUE function converts a date in text format to a datetime value. In this example, it converts the text “2022-01-31” to a datetime value.

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

DAY(‘Sales’[OrderDate])

A

The DAY function returns the day of the month (a number from 1 to 31) for a given date. In this example, it returns the day of the month for the ‘OrderDate’ column in the ‘Sales’ table.

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

EDATE(‘Sales’[StartDate], 3)

A

The EDATE function returns a date that is a specified number of months before or after a given start date. In this example, it calculates a date that is 3 months after the ‘StartDate’ column in the ‘Sales’ table.

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

EOMONTH(TODAY(), -1)

A

The EOMONTH function returns the last day of the month before or after a specified number of months from a given date. In this example, it calculates the last day of the month one month before today’s date.

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

HOUR(‘Sales’[OrderTime])

A

The HOUR function returns the hour (as a number from 0 to 23) for a given datetime value. In this example, it returns the hour of the ‘OrderTime’ column in the ‘Sales’ table.

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

MINUTE(‘Sales’[StartTime])

A

The MINUTE function returns the minute (a number from 0 to 59) for a given datetime value. In this example, it returns the minute of the ‘StartTime’ column in the ‘Sales’ table.

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

MONTH(‘Sales’[InvoiceDate])

A

The MONTH function returns the month (a number from 1 to 12) for a given date. In this example, it returns the month of the ‘InvoiceDate’ column in the ‘Sales’ table.

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

NETWORKDAYS(‘Calendar’[Date], TODAY())

A

The NETWORKDAYS function calculates the number of whole workdays between two dates, considering weekends and optionally specified holidays. In this example, it calculates the network days between a date in the ‘Calendar’ table and today’s date.

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

NOW()

A

The NOW function returns the current date and time in datetime format. In this example, it returns the current date and time.

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

QUARTER(‘Sales’[OrderDate])

A

The QUARTER function returns the quarter of the year (a number from 1 to 4) for a given date. In this example, it returns the quarter of the ‘OrderDate’ column in the ‘Sales’ table.

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

SECOND(‘Sales’[EndTime])

A

The SECOND function returns the seconds (a number from 0 to 59) of a given time value. In this example, it returns the seconds of the ‘EndTime’ column in the ‘Sales’ table.

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

TIME(15, 30, 0)

A

The TIME function converts hours, minutes, and seconds given as numbers into a time in datetime format. In this example, it creates a time value for 3:30 PM.

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

TIMEVALUE(“09:45:00 AM”)

A

The TIMEVALUE function converts a time in text format to a time in datetime format. In this example, it converts the text “09:45:00 AM” to a time value.

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

TODAY()

A

The TODAY function returns the current date. In this example, it returns today’s date.

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

UTCNOW()

A

The UTCNOW function returns the current UTC (Coordinated Universal Time) date and time. In this example, it returns the current UTC date and time.

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

UTCTODAY()

A

The UTCTODAY function returns the current UTC date. In this example, it returns the current UTC date.

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

WEEKDAY(‘Calendar’[Date])

A

The WEEKDAY function returns a number from 1 to 7 identifying the day of the week for a given date. In this example, it returns the day of the week for a date in the ‘Calendar’ table.

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

WEEKNUM(‘Calendar’[Date], 2)

A

The WEEKNUM function returns the week number for a given date and year according to the specified return_type value. In this example, it calculates the week number for a date in the ‘Calendar’ table using return_type 2 (ISO week numbering).

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

YEAR(‘Sales’[OrderDate])

A

The YEAR function returns the year of a date as a four-digit integer in the range 1900-9999. In this example, it returns the year of the ‘OrderDate’ column in the ‘Sales’ table.

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

YEARFRAC(‘Sales’[StartDate], ‘Sales’[EndDate])

A

The YEARFRAC function calculates the fraction of the year represented by the number of whole days between two dates. In this example, it calculates the year fraction between the ‘StartDate’ and ‘EndDate’ columns in the ‘Sales’ table.

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

ALL(‘Sales’)

A

The ALL function returns all the rows in a table, ignoring any filters that might have been applied. In this example, it returns all rows in the ‘Sales’ table.

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

ALLCROSSFILTERED()

A

This function clears all filters that are applied to a table, removing any cross-filtering effects. It doesn’t require any specific arguments.

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

ALLEXCEPT(‘Sales’, ‘Sales’[ProductCategory])

A

The ALLEXCEPT function removes all context filters in the ‘Sales’ table except for the filters applied to the ‘ProductCategory’ column. It retains filters on that specified column.

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

ALLNOBLANKROW(‘Product’)

A

The ALLNOBLANKROW function returns all rows of a table except the blank row and disregards any context filters. In this example, it returns all distinct values of the ‘Product’ column except the blank row.

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

ALLSELECTED(‘Date’[Date])

A

The ALLSELECTED function removes context filters from columns and rows in the current query while retaining all other context filters or explicit filters. In this example, it removes filters from the ‘Date’ table’s ‘Date’ column.

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

CALCULATE(SUM(‘Sales’[SalesAmount]), ‘Product’[Category] = “Electronics”)

A

The CALCULATE function evaluates an expression in a modified filter context. In this example, it calculates the sum of ‘SalesAmount’ in the ‘Sales’ table while filtering the ‘Product’ table by the category “Electronics”.

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

CALCULATETABLE(‘Sales’, ‘Sales’[Quantity] > 5)

A

The CALCULATETABLE function evaluates a table expression in a modified filter context. In this example, it returns a new table consisting of rows from the ‘Sales’ table where the ‘Quantity’ is greater than 5.

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

EARLIER(‘Sales’[Product])

A

The EARLIER function returns the current value of the specified column in an outer evaluation pass of the mentioned column. In this example, it returns the ‘Product’ column value from the outer context.

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

EARLIEST(‘Sales’[OrderDate])

A

The EARLIEST function returns the current value of the specified column in an outer evaluation pass of the ‘OrderDate’ column. It is typically used in time intelligence calculations.

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

FILTER(‘Sales’, ‘Sales’[Quantity] > 10)

A

The FILTER function returns a table that represents a subset of another table or expression based on specified conditions. In this example, it filters the ‘Sales’ table to include only rows where the ‘Quantity’ is greater than 10.

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

INDEX(‘Products’, 3)

A

The INDEX function returns a row at an absolute position specified by the position parameter within the specified table. In this example, it returns the third row from the ‘Products’ table.

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

KEEPFILTERS(CALCULATE(SUM(‘Sales’[SalesAmount]), ‘Product’[Category] = “Electronics”))

A

The KEEPFILTERS function modifies how filters are applied while evaluating a CALCULATE or CALCULATETABLE function. It retains the existing filters when calculating the sum of ‘SalesAmount’ while filtering the ‘Product’ table by the category “Electronics”.

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

LOOKUPVALUE(‘Sales’[ProductName], ‘Sales’[ProductID], 101)

A

The LOOKUPVALUE function returns the value for the row that meets all criteria specified by search conditions. In this example, it looks up the ‘ProductName’ where the ‘ProductID’ is 101 in the ‘Sales’ table.

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

RANKX(‘Sales’, [SalesAmount], , DESC)

A

In window functions, the MATCHBY parameter defines the columns used to determine how to match data and identify the current row. This example uses ‘RANKX’ and defines the sorting and ranking order for ‘SalesAmount’.

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

OFFSET(‘Sales’, 1)

A

The OFFSET function returns a single row positioned either before or after the current row within the same table, by a given offset. In this example, it returns the row that is 1 position after the current row in the ‘Sales’ table.

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

ORDERBY(‘Sales’, ‘Sales’[OrderDate], ASC)

A

In window functions, the ORDERBY function defines the columns that determine the sort order within each partition. This example orders the ‘Sales’ table by ‘OrderDate’ in ascending order.

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

PARTITIONBY(‘Sales’, ‘Sales’[Category])

A

In window functions, the PARTITIONBY function defines the columns used to partition a WINDOW function’s relation parameter. This example partitions the ‘Sales’ table by the ‘Category’ column.

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

RANKX(‘Sales’, [SalesAmount], , DESC)

A

In window functions, the RANK function returns the ranking of a row within the given interval. This example calculates the rank of each row in the ‘Sales’ table based on ‘SalesAmount’ in descending order.

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

REMOVEFILTERS(‘Product’, ‘Category’)

A

The REMOVEFILTERS function clears filters from the specified tables or columns. In this example, it removes filters from the ‘Product’ and ‘Category’ tables.

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

ROWNUMBER(‘Sales’, [SalesAmount], , DESC)

A

In window functions, the ROWNUMBER function returns the unique ranking of a row within the given interval. This example calculates a unique sequential number for each row in the ‘Sales’ table based on ‘SalesAmount’ in descending order.

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

SELECTEDVALUE(‘Product’[Category], “Default”)

A

The SELECTEDVALUE function returns the value when the context for the columnName has been filtered down to one distinct value only. Otherwise, it returns the alternateResult. In this example, it returns the selected ‘Category’ value from the ‘Product’ table or “Default” if multiple values exist.

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

WINDOW(MAX(‘Sales’[OrderDate]), -1, 1)

A

The WINDOW function returns multiple rows positioned within the given interval. In this example, it returns rows within a window defined by the maximum ‘OrderDate’ value, one row before, and one row after that maximum value from the ‘Sales’ table.

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

COLUMNSTATISTICS(‘Sales’)

A

The COLUMNSTATISTICS function returns a table of statistics regarding every column in the ‘Sales’ table (or any specified table), providing insights into column characteristics like minimum, maximum, and average values.

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

CONTAINS(‘Products’[Category], “Electronics”)

A

The CONTAINS function checks if the ‘Category’ column in the ‘Products’ table contains the value “Electronics” and returns TRUE if it does, or FALSE if it doesn’t.

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

CONTAINSROW(‘Customers’, ‘Customers’[CustomerID], 101)

A

The CONTAINSROW function checks if a row of values exists in the ‘Customers’ table (based on the ‘CustomerID’ column) with a value of 101 and returns TRUE if it does, otherwise, it returns FALSE.

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

CONTAINSSTRING(‘TextData’[Description], “important”)

A

The CONTAINSSTRING function checks if the ‘Description’ column in the ‘TextData’ table contains the string “important” and returns TRUE if it does, or FALSE if it doesn’t.

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

CONTAINSSTRINGEXACT(‘TextData’[Title], “Exact Match”)

A

The CONTAINSSTRINGEXACT function checks if the ‘Title’ column in the ‘TextData’ table contains the exact string “Exact Match” and returns TRUE if it’s an exact match, otherwise, it returns FALSE.

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

CUSTOMDATA()

A

The CUSTOMDATA function returns the content of the CustomData property in the connection string, providing custom data or metadata related to the data source.

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

HASONEFILTER(‘Product’[Category])

A

The HASONEFILTER function returns TRUE when there is only one directly filtered value on the ‘Category’ column in the ‘Product’ table, indicating single-value filtering.

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

HASONEVALUE(‘Customer’[CustomerID])

A

The HASONEVALUE function returns TRUE when the context for ‘CustomerID’ has been filtered down to one distinct value only in the ‘Customer’ table. Otherwise, it returns FALSE.

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

ISAFTER(‘Date’[Date], DATE(2022, 1, 1))

A

The ISAFTER function emulates the behavior of a Start At clause and returns true for a row where the ‘Date’ column is on or after January 1, 2022.

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

ISBLANK(‘Sales’[Revenue])

A

The ISBLANK function checks whether the ‘Revenue’ column in the ‘Sales’ table is blank (no revenue recorded) and returns TRUE or FALSE accordingly.

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

ISCROSSFILTERED(‘Order’[ProductID])

A

The ISCROSSFILTERED function returns TRUE when the ‘ProductID’ column in the ‘Order’ table or another related table is being filtered directly, indicating cross-filtering.

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

ISEMPTY(‘EmptyTable’)

A

The ISEMPTY function checks if the ‘EmptyTable’ is empty (contains no rows) and returns TRUE if it’s empty, otherwise, it returns FALSE.

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

ISERROR([SalesAmount])

A

Checks if the value in the ‘SalesAmount’ column is an error. If it is, it returns TRUE; otherwise, it returns FALSE.

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

ISEVEN([OrderQuantity])

A

Determines if the ‘OrderQuantity’ is an even number and returns TRUE if it is, or FALSE if it’s odd.

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

ISFILTERED(‘Date’[Year])

A

Verifies if the ‘Year’ column in the ‘Date’ table is currently filtered. Returns TRUE if filtered, FALSE if not.

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

ISINSCOPE(‘Product’[Category])

A

Checks if the ‘Category’ column in the ‘Product’ table is currently in scope. Returns TRUE if it is, FALSE if not.

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

ISLOGICAL([IsCompleted])

A

Determines if the value in the ‘IsCompleted’ column is a logical value (TRUE or FALSE). Returns TRUE for logical values, otherwise FALSE.

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

ISNONTEXT([ProductName])

A

Checks if the ‘ProductName’ column contains non-text values (blank cells are considered non-text). Returns TRUE if non-text, FALSE if text.

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

ISNUMBER([UnitPrice])

A

Determines if the values in the ‘UnitPrice’ column are numbers. Returns TRUE for numbers, FALSE for non-numeric values.

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

ISODD([InvoiceNumber])

A

Checks if the ‘InvoiceNumber’ is an odd number and returns TRUE if it is, or FALSE if it’s even.

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

ISONORAFTER([TransactionDate], “2022-01-01”)

A

Emulates the behavior of a Start At clause and returns TRUE for rows with ‘TransactionDate’ after January 1, 2022.

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

ISSELECTEDMEASURE([Total Sales], [Total Profit], [Revenue])

A

Checks if one of the specified measures is selected in the current context. Returns TRUE if selected, otherwise FALSE.

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

ISSUBTOTAL([IsSubtotal], [Category])

A

Creates a column in a SUMMARIZE expression that returns TRUE if the row contains subtotal values for the ‘Category’ column, otherwise FALSE.

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

ISTEXT([CustomerComments])

A

Determines if the values in the ‘CustomerComments’ column are text. Returns TRUE for text values, FALSE for non-text.

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

NONVISUAL(‘Region’[Region])

A

Marks a value filter in a SUMMARIZECOLUMNS expression as non-visual for the ‘Region’ column.

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

SELECTEDMEASURE()

A

Returns the name of the currently selected measure in the context.

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

SELECTEDMEASUREFORMATSTRING()

A

Returns the format string of the currently selected measure in the context.

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

SELECTEDMEASURENAME()

A

Returns the name of the currently selected measure in the context.

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

USERCULTURE()

A

Returns the locale for the current user.

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

USERNAME()

A

Returns the domain name and username from the credentials given to the system at connection time.

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

USEROBJECTID()

A

Returns the current user’s Object ID or SID.

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

USERPRINCIPALNAME()

A

Returns the user principal name.

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

AND([IsCompleted], [IsApproved])

A

Checks whether both ‘IsCompleted’ and ‘IsApproved’ columns are TRUE, and returns TRUE if both are TRUE; otherwise, returns FALSE.

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

BITAND(5, 3)

A

Performs a bitwise ‘AND’ operation on the binary representations of 5 and 3 and returns the result.

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

BITLSHIFT(4, 2)

A

Shifts the binary representation of 4 two bits to the left and returns the result.

104
Q

BITOR(2, 4)

A

Performs a bitwise ‘OR’ operation on the binary representations of 2 and 4 and returns the result.

105
Q

BITRSHIFT(16, 2)

A

Shifts the binary representation of 16 two bits to the right and returns the result.

106
Q

BITXOR(5, 3)

A

Performs a bitwise ‘XOR’ operation on the binary representations of 5 and 3 and returns the result.

107
Q

COALESCE([Column1], [Column2], [Column3])

A

Returns the first non-blank value among ‘Column1’, ‘Column2’, and ‘Column3’.

108
Q

FALSE()

A

Returns the logical value FALSE.

109
Q

IF([Sales] > 1000, “High”, “Low”)

A

Checks if ‘Sales’ is greater than 1000. If TRUE, returns “High”; otherwise, returns “Low”.

110
Q

IF.EAGER([Total Sales] > [Total Budget], “Over Budget”, “On Budget”)

A

Checks if ‘Total Sales’ is greater than ‘Total Budget’. If TRUE, returns “Over Budget”; otherwise, returns “On Budget”.

111
Q

IFERROR([Dividend] / [Divisor], 0)

A

Divides ‘Dividend’ by ‘Divisor’ and returns the result. If there’s an error, it returns 0.

112
Q

NOT([IsApproved])

A

Negates the value in the ‘IsApproved’ column. Returns TRUE if ‘IsApproved’ is FALSE and vice versa.

113
Q

OR([IsCompleted], [IsApproved])

A

Checks if either ‘IsCompleted’ or ‘IsApproved’ (or both) are TRUE and returns TRUE if at least one is TRUE.

114
Q

SWITCH([Category], “A”, “Category A”, “B”, “Category B”, “Other”)

A

Evaluates the ‘Category’ column and returns different values based on specified conditions.

115
Q

TRUE()

A

Returns the logical value TRUE.

116
Q

ABS([Profit])

A

Returns the absolute value of ‘Profit’, ensuring it’s a positive number.

117
Q

CEILING([Price], 10)

A

Rounds ‘Price’ up to the nearest multiple of 10.

118
Q

CONVERT([Distance], “m”, “km”)

A

Converts the ‘Distance’ value from meters to kilometers.

119
Q

CURRENCY([Amount])

A

Evaluates the ‘Amount’ and returns the result as currency data type.

120
Q

DEGREES([Radians])

A

Converts the value in ‘Radians’ into degrees.

121
Q

DIVIDE([Numerator], [Denominator])

A

Performs division of ‘Numerator’ by ‘Denominator’. Returns a result or BLANK() if ‘Denominator’ is 0.

122
Q

EVEN([Number])

A

Rounds ‘Number’ up to the nearest even integer.

123
Q

EXP([Exponent])

A

Returns the value of e raised to the power of ‘Exponent’.

124
Q

FACT([Number])

A

Returns the factorial of a number, equal to the series 123 up to the given ‘Number’.

125
Q

FLOOR([Value], [Significance])

A

Rounds ‘Value’ down, toward zero, to the nearest multiple of ‘Significance’.

126
Q

GCD([Number1], [Number2])

A

Returns the greatest common divisor of ‘Number1’ and ‘Number2’.

127
Q

INT([Number])

A

Rounds ‘Number’ down to the nearest integer.

128
Q

ISO.CEILING([Value], [Significance])

A

Rounds ‘Value’ up, to the nearest integer or to the nearest multiple of ‘Significance’.

129
Q

LCM([Number1], [Number2])

A

Returns the least common multiple of ‘Number1’ and ‘Number2’.

130
Q

LN([Number])

A

Returns the natural logarithm of ‘Number’.

131
Q

LOG([Number], [Base])

A

Returns the logarithm of ‘Number’ to the specified ‘Base’.

132
Q

LOG10([Number])

A

Returns the base-10 logarithm of ‘Number’.

133
Q

MOD([Dividend], [Divisor])

A

Returns the remainder after ‘Dividend’ is divided by ‘Divisor’. The result has the same sign as the ‘Divisor’.

134
Q

MROUND([Value], [Multiple])

A

Returns ‘Value’ rounded to the desired ‘Multiple’.

135
Q

ODD([Number])

A

Rounds ‘Number’ up to the nearest odd integer.

136
Q

PI()

A

Returns the value of Pi, approximately 3.14159265358979.

137
Q

POWER([Base], [Exponent])

A

Returns the result of ‘Base’ raised to the power of ‘Exponent’.

138
Q

QUOTIENT([Numerator], [Denominator])

A

Performs division of ‘Numerator’ by ‘Denominator’ and returns only the integer portion of the division result.

139
Q

RADIANS([Degrees])

A

Converts the value in ‘Degrees’ to radians.

140
Q

RAND()

A

Returns a random number greater than or equal to 0 and less than 1, evenly distributed.

141
Q

RANDBETWEEN([Min], [Max])

A

Returns a random number in the range between ‘Min’ and ‘Max’ (inclusive).

142
Q

ROUND([Value], [DecimalPlaces])

A

Rounds ‘Value’ to the specified number of ‘DecimalPlaces’.

143
Q

ROUNDDOWN([Value], [DecimalPlaces])

A

Rounds ‘Value’ down, toward zero, to the specified number of ‘DecimalPlaces’.

144
Q

ROUNDUP([Value], [DecimalPlaces])

A

Rounds ‘Value’ up, away from zero, to the specified number of ‘DecimalPlaces’.

145
Q

SIGN([Number])

A

Determines the sign of ‘Number’. Returns 1 if positive, -1 if negative, and 0 if zero.

146
Q

SQRT([Number])

A

Returns the square root of ‘Number’.

147
Q

SQRTPI([Number])

A

Returns the square root of (‘Number’ * Pi).

148
Q

TRUNC([Number])

A

Truncates ‘Number’ to an integer by removing the decimal or fractional part.

149
Q

BLANK()

A

Returns a blank value.

150
Q

ERROR(“An error occurred.”)

A

Raises an error with the specified error message.

151
Q

EVALUATEANDLOG([Expression], “Log message”)

A

Evaluates the provided ‘Expression’ and logs it in a DAX Evaluation Log profiler event with the specified message.

152
Q

TOCSV([Table], “FileName.csv”)

A

Converts the ‘Table’ into a string in CSV format and optionally saves it to a file named “FileName.csv”.

153
Q

TOJSON([Table], “FileName.json”)

A

Converts the ‘Table’ into a string in JSON format and optionally saves it to a file named “FileName.json”.

154
Q

PATH(“Category”, “Subcategory”, “Product”)

A

Returns a delimited text string with the identifiers of all the parents of the current identifier.

155
Q

PATHCONTAINS(“Category/Subcategory/Product”, “Subcategory”)

A

Returns TRUE if the specified ‘item’ exists within the specified ‘path’.

156
Q

PATHITEM(“Category/Subcategory/Product”, 2)

A

Returns the item at the specified ‘position’ from a string resulting from the evaluation of a PATH function.

157
Q

PATHITEMREVERSE(“Category/Subcategory/Product”, 1)

A

Returns the item at the specified ‘position’ from a string resulting from the evaluation of a PATH function, in reverse order.

158
Q

PATHLENGTH(“Category/Subcategory/Product”)

A

Returns the number of parents to the specified item in a given PATH result, including itself.

159
Q

CROSSFILTER(‘Sales’[ProductID], ‘Products’[ProductID], Both)

A

Specifies the cross-filtering direction between the ‘Sales’ and ‘Products’ tables as ‘Both’.

160
Q

RELATED(‘Category’[CategoryName])

A

Returns a related value from the ‘Category’ table based on the relationship.

161
Q

RELATEDTABLE(‘Sales’)

A

Evaluates a table expression in a context modified by the filters applied to the ‘Sales’ table.

162
Q

USERELATIONSHIP(‘Customers’[CustomerID], ‘Orders’[CustomerID])

A

Specifies the relationship between ‘Customers’ and ‘Orders’ tables to be used in a specific calculation.

163
Q

MEDIAN(‘Sales’[Quantity])

A

Calculates the median for a column of values.

164
Q

MEDIANX(‘Sales’, ‘Sales’[Quantity])

A

Calculates the median for a column within a table.

165
Q

RANK.EQ(‘Sales’[Sales], 500)

A

Returns the rank of a value in a column with ties assigned the average rank.

166
Q

RANKX(‘Sales’, ‘Sales’[Profit], , ASC, DENSE)

A

Returns the rank of values within a table with optional parameters.

167
Q

SAMPLE(‘Products’, 5)

A

Returns a random sample of rows from a table.

168
Q

ADDCOLUMNS(‘Sales’, “Revenue”, ‘Sales’[Amount] * ‘Sales’[Quantity])

A

Adds a calculated column to a table or table expression.

169
Q

ADDMISSINGITEMS(‘Products’, ‘Products’[Category])

A

Adds missing items to a table based on a specified column.

170
Q

CROSSJOIN(‘Customers’, ‘Products’)

A

Creates a new table by performing a cross join between two tables.

171
Q

CURRENTGROUP()

A

Returns a table representing the current group within an iteration.

172
Q

DATATABLE(“Category”, STRING, “Amount”, INTEGER, {{“A”, 100}, {“B”, 200}})

A

Creates a table in DAX with specified columns and values.

173
Q

DETAILROWS(‘Sales’)

A

Returns a table with all rows that contribute to a cell value in a pivot table.

174
Q

DISTINCT(‘Products’[Category])

A

Returns a table with distinct values from a specific column.

175
Q

DISTINCT(‘Products’)

A

Returns a table with distinct rows from a table.

176
Q

EXCEPT(‘Customers’, FILTER(‘Customers’, ‘Customers’[Country] = “USA”))

A

Returns the set difference between two tables.

177
Q

FILTERS(‘Customers’)

A

Returns a table with all active filters on a table.

178
Q

GENERATE(‘Dates’, ‘Products’)

A

Creates a table by applying a function to each row from two input tables.

179
Q

GENERATEALL(‘Dates’, ‘Products’)

A

Creates a table by applying a function to each row from two input tables, preserving all rows.

180
Q

GENERATESERIES(1, 10, 1)

A

Generates a table with a single column containing a series of numbers.

181
Q

GROUPBY(‘Sales’, ‘Sales’[Category], “Total Sales”, SUMX(CURRENTGROUP(), ‘Sales’[Amount]))

A

Groups a table by specified columns and aggregates data.

182
Q

IGNORE(‘Customers’, ‘Customers’[Age])

A

Returns a table with the same columns as the input table, ignoring the specified column.

183
Q

INTERSECT(‘Customers’, FILTER(‘Customers’, ‘Customers’[Country] = “USA”))

A

Returns the intersection of two tables.

184
Q

NATURALINNERJOIN(‘Customers’, ‘Orders’)

A

Performs a natural inner join between two tables using common column names.

185
Q

NATURALLEFTOUTERJOIN(‘Customers’, ‘Orders’)

A

Performs a natural left outer join between two tables using common column names.

186
Q

ROLLUP(‘Date’[Year], ‘Date’[Quarter], ‘Date’[Month])

A

Creates a rollup table with aggregated values based on specified columns.

187
Q

ROLLUPADDISSUBTOTAL(‘Date’[Year], ‘Date’[Quarter], ‘Date’[Month])

A

Adds subtotals to a rollup table based on specified columns.

188
Q

ROLLUPISSUBTOTAL(‘Date’[Year], ‘Date’[Quarter], ‘Date’[Month])

A

Checks if a row in a rollup table is a subtotal row.

189
Q

ROLLUPGROUP(‘Date’[Year], ‘Date’[Quarter], ‘Date’[Month])

A

Returns the group name for a row in a rollup table.

190
Q

ROW(“Product”, “A”, “Price”, 10)

A

Creates a single-row table with specified column names and values.

191
Q

SELECTCOLUMNS(‘Sales’, “Product”, ‘Products’[Name])

A

Creates a new table by selecting columns from an existing table or table expression.

192
Q

SUBSTITUTEWITHINDEX(“Hello World”, “o”, 3)

A

Replaces a character in a text string at a specified position with another character.

193
Q

SUMMARIZE(‘Sales’, ‘Sales’[Category], “Total Sales”, SUM(‘Sales’[Amount]))

A

Aggregates data and groups rows based on specified columns.

194
Q

SUMMARIZECOLUMNS(‘Sales’, ‘Sales’[Category], “Total Sales”, SUM(‘Sales’[Amount]))

A

Aggregates data and groups rows based on specified columns, allowing additional calculations.

195
Q

SUMMARIZECOLUMNS(“Product”, {“A”, “B”, “C”}, “Sales”, {100, 200, 150})

A

Creates a table with specified column names and values.

196
Q

TOPN(5, ‘Sales’, ‘Sales’[Amount])

A

Returns the top N rows from a table based on a specified column’s values.

197
Q

TREATAS({‘New York’, ‘California’}, ‘Customers’[State])

A

Modifies filter context by treating specified values as if they were part of a column.

198
Q

UNION(‘Table1’, ‘Table2’)

A

Combines two or more tables into a single table, stacking rows on top of each other.

199
Q

VALUES(‘Products’[Category])

A

Returns a table with distinct values from a specified column.

200
Q

COMBINEVALUES(“:”, ‘Products’[Category], ‘Products’[Subcategory])

A

Combines multiple columns into a single text string, separated by a delimiter.

201
Q

CONCATENATE(“Hello”, “ “, “World”)

A

Combines multiple text strings into a single text string.

202
Q

CONCATENATEX(‘Sales’, ‘Sales’[Product], “, “)

A

Combines multiple text values from a column into a single text string, separated by a delimiter.

203
Q

EXACT(“Hello”, “HELLO”)

A

Checks if two text strings are exactly the same and returns TRUE or FALSE.

204
Q

FIND(“lo”, “Hello”)

A

Searches for a text string within another text string and returns the starting position.

205
Q

FIXED(1234.567, 2)

A

Converts a number into a text string with a specified number of decimal places.

206
Q

FORMAT(‘Dates’[Date], “MMM yyyy”)

A

Formats a date or time value as a text string using a specified format.

207
Q

LEFT(“Hello”, 3)

A

Returns a specified number of characters from the beginning of a text string.

208
Q

LEN(“Hello”)

A

Returns the number of characters in a text string.

209
Q

LOWER(“Hello”)

A

Converts all characters in a text string to lowercase.

210
Q

MID(“Hello”, 2, 3)

A

Returns a specified number of characters from a text string, starting at a specified position.

211
Q

REPLACE(“Hello World”, “World”, “Universe”)

A

Replaces occurrences of a substring within a text string with another substring.

212
Q

REPT(“*”, 5)

A

Repeats a text string a specified number of times and returns the result.

213
Q

RIGHT(“Hello”, 3)

A

Returns a specified number of characters from the end of a text string.

214
Q

SEARCH(“lo”, “Hello”)

A

Searches for a text string within another text string and returns the starting position.

215
Q

SUBSTITUTE(“Hello World”, “World”, “Universe”)

A

Replaces occurrences of a substring within a text string with another substring.

216
Q

TRIM(“ Hello “)

A

Removes leading and trailing spaces from a text string.

217
Q

UNICHAR(65)

A

Returns the Unicode character with the specified code point.

218
Q

UNICODE(“A”)

A

Returns the Unicode code point for the first character in a text string.

219
Q

UPPER(“Hello”)

A

Converts all characters in a text string to uppercase.

220
Q

VALUE(“123”)

A

Converts a text string that represents a number into a numeric value.

221
Q

CLOSINGBALANCEMONTH(‘Sales’[Amount], ‘Date’[Date], 1)

A

Calculates the closing balance of a measure for the current month.

222
Q

CLOSINGBALANCEQUARTER(‘Sales’[Amount], ‘Date’[Date], 1)

A

Calculates the closing balance of a measure for the current quarter.

223
Q

CLOSINGBALANCEYEAR(‘Sales’[Amount], ‘Date’[Date], 1)

A

Calculates the closing balance of a measure for the current year.

224
Q

DATEADD(‘Date’[Date], -1, MONTH)

A

Adds or subtracts a specified number of units (e.g., days, months) to a date.

225
Q

DATESBETWEEN(‘Date’[Date], ‘Date’[Start], ‘Date’[End])

A

Returns a table of dates between two specified dates.

226
Q

DATESINPERIOD(‘Date’[Date], TODAY(), -30, DAY)

A

Returns a table of dates that fall within a specified time period relative to a given date.

227
Q

DATESMTD(‘Date’[Date])

A

Returns a table of dates for the current month-to-date based on a date column.

228
Q

DATESQTD(‘Date’[Date])

A

Returns a table of dates for the current quarter-to-date based on a date column.

229
Q

DATESYTD(‘Date’[Date])

A

Returns a table of dates for the current year-to-date based on a date column.

230
Q

ENDOFMONTH(‘Date’[Date])

A

Returns the last day of the month for a given date.

231
Q

ENDOFQUARTER(‘Date’[Date])

A

Returns the last day of the quarter for a given date.

232
Q

ENDOFYEAR(‘Date’[Date])

A

Returns the last day of the year for a given date.

233
Q

FIRSTDATE(‘Date’[Date])

A

Returns the first date in a table or table expression.

234
Q

FIRSTNONBLANK(‘Products’[Name], ‘Sales’[Amount])

A

Returns the first non-blank value in a column, considering another column as the filter context.

235
Q

LASTDATE(‘Date’[Date])

A

Returns the last date in a table or table expression.

236
Q

LASTNONBLANK(‘Products’[Name], ‘Sales’[Amount])

A

Returns the last non-blank value in a column, considering another column as the filter context.

237
Q

NEXTDAY(‘Date’[Date], 3)

A

Returns the date that is a specified number of days after a given date.

238
Q

NEXTMONTH(‘Date’[Date])

A

Returns the first day of the next month after a given date.

239
Q

NEXTQUARTER(‘Date’[Date])

A

Returns the first day of the next quarter after a given date.

240
Q

NEXTYEAR(‘Date’[Date])

A

Returns the first day of the next year after a given date.

241
Q

OPENINGBALANCEMONTH(‘Sales’[Amount], ‘Date’[Date])

A

Calculates the opening balance of a measure for the current month.

242
Q

OPENINGBALANCEQUARTER(‘Sales’[Amount], ‘Date’[Date])

A

Calculates the opening balance of a measure for the current quarter.

243
Q

OPENINGBALANCEYEAR(‘Sales’[Amount], ‘Date’[Date])

A

Calculates the opening balance of a measure for the current year.

244
Q

PARALLELPERIOD(‘Date’[Date], 1, MONTH)

A

Returns a date from a parallel period, such as the previous month or year, based on a given date.

245
Q

PREVIOUSDAY(‘Date’[Date], 2)

A

Returns the date that is a specified number of days before a given date.

246
Q

PREVIOUSMONTH(‘Date’[Date])

A

Returns the first day of the previous month before a given date.

247
Q

PREVIOUSQUARTER(‘Date’[Date])

A

Returns the first day of the previous quarter before a given date.

248
Q

PREVIOUSYEAR(‘Date’[Date])

A

Returns the first day of the previous year before a given date.

249
Q

SAMEPERIODLASTYEAR(‘Date’[Date])

A

Returns a table of dates from the same period in the previous year based on a given date.

250
Q

STARTOFMONTH(‘Date’[Date])

A

Returns the first day of the month for a given date.

251
Q

STARTOFQUARTER(‘Date’[Date])

A

Returns the first day of the quarter for a given date.

252
Q

STARTOFYEAR(‘Date’[Date])

A

Returns the first day of the year for a given date.

253
Q

TOTALMTD(SUM(‘Sales’[Amount]), ‘Date’[Date])

A

Calculates the total month-to-date for a measure, considering a date column.

254
Q

TOTALQTD(SUM(‘Sales’[Amount]), ‘Date’[Date])

A

Calculates the total quarter-to-date for a measure, considering a date column.

255
Q

TOTALYTD(SUM(‘Sales’[Amount]), ‘Date’[Date])

A

Calculates the total year-to-date for a measure, considering a date column.