DAX Formulas and Functions Flashcards
6 cards from real Microsoft Power BI practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 DAX Formulas and Functions flashcards as text
What does the DAX function CALCULATE() do?
Answer: Evaluates an expression in a modified filter context
CALCULATE() evaluates a DAX expression after applying the specified filter modifications to the filter context.
What is the result of the DAX expression SUMX(Sales, Sales[Quantity] * Sales[Price])?
Answer: The row-by-row product of Quantity and Price, summed across all rows
SUMX iterates over each row in the Sales table, multiplies Quantity by Price, and then sums all the resulting values.
What does ALL() do when used inside CALCULATE()?
Answer: Removes filters from the specified table or columns
ALL() removes any existing filters on the specified table or columns, allowing the measure to calculate across all data regardless of slicers.
What is the difference between DISTINCTCOUNT() and COUNT() in DAX?
Answer: DISTINCTCOUNT counts unique non-blank values; COUNT counts all non-blank values including duplicates
DISTINCTCOUNT counts the number of unique, non-blank values in a column, while COUNT counts all non-blank values including duplicates.
In DAX, what does the RELATED() function do?
Answer: Returns a value from a related table by following an existing relationship
RELATED() follows an existing many-to-one relationship from the current row context to retrieve a value from a related table.
What does the DAX function DIVIDE(numerator, denominator, alternateResult) do differently than simply using the / operator?
Answer: It returns the alternateResult (default 0) instead of an error when dividing by zero
DIVIDE() safely handles division by zero by returning an alternate result (default BLANK or a specified value) instead of throwing an error.