Which of these DAX function categories loops through the same calculation on each row of a table, then aggregates the results?
Logical Functions
Filter Functions
Stats Functions
Iterator Functions
Answer is Iterator Functions
Iterator (or “X”) functions allow you to loop through the same calculation on each row of a table, and then apply some sort of aggregation to the results (SUM, MAX, etc.).
Question 122
Which of the following functions modifies and overrules any competing filter context?
CALCULATE
SUMX
RELATED
REPLACE
Answer is CALCULATE
CALCULATE modifies and overrules any competing filter context!
Question 123
Which of the following functions removes filter context?
CALCULATE
ALL
FILTER
All of the above
Answer is ALL
Instead of adding filter context, ALL removes it; use it when you need unfiltered values that won’t react to changes in filter context (i.e. % of Total, where the denominator needs to remain fixed)
Question 124
Which of the following functions returns a table?
TOPN
FILTER
DATEADD
All of the above
Answer is All of the above
All of these functions return tables.
Question 125
Which of the following is NOT true about CALCULATE modifiers?
They are used to change filter context
They are used to access inactive table relationships
They allow you to drag and drop fields rather than write DAX from scratch
They are used to change the way filters propagate
Answer is They allow you to drag and drop fields rather than write DAX from scratch
Quick measures allow you to drag and drop fields rather than write DAX from scratch. The rest are all use cases for CALCULATE modifiers.
Question 126
Which of the following functions allows you to calculate running totals?
DATESYTD
DATEADD
DATESINPERIOD
All of the above
Answer is DATESINPERIOD
DATESINPERIOD allows you to calculate running totals. DATESYTD is allows you to calculate performance to-date, and DATEADD allows you to calculate for a previous period.
Question 127
You have a table named Sales. Sales contains the data shown in the following table.
You have the following measure.
Total Sales This Year = SUM([Total Sales])
You plan to create a KPI to compare the current yearly sales to the previous year as shown in the exhibit.
You need to create the measure for the goal.
How should you complete the DAX formula?
You have a Power BI model that contains the following two tables:
- Sales(Sales_ID, sales_date, sales_amount, CustomerID)
- Customer(CustomerID, First_name, Last_name)
There is a relationship between Sales and Customer.
You need to create a measure to rank the customers based on their total sales amount.
FORMAT function using “MMM” produces the short name version of month (eg. Jan, Feb, Mar etc.). If the full month name is required, simply replace “MMM” with “MMMM”