Unit 4: Advanced Calculations with DAX - Practice Quiz

INT374 — Data Analytics With Power Bi 50 Questions
0 Correct 0 Wrong 50 Left
0/50

1 What does the acronym DAX stand for in the context of Power BI?

A. Data Analysis Expression
B. Database Access Extension
C. Dynamic Analytical Exchange
D. Data Aggregation XML

2 Which of the following statements best describes a Calculated Column in Power BI?

A. It is calculated on the fly when a report is rendered.
B. It is strictly used for aggregation only.
C. It cannot be used in a slicer or filter.
D. It stores the result of the calculation in the model's memory.

3 When is a DAX Measure calculated?

A. At query time, when used in a visual or interaction occurs.
B. When a new table is imported.
C. During data refresh.
D. When the Power BI file is saved.

4 What is an 'Implicit Measure'?

A. A measure defined using DAX code.
B. A measure that uses the CALCULATE function.
C. An aggregation created automatically by dragging a field into a visual.
D. A calculated column used as a filter.

5 Which symbol is used to start a comment in DAX?

A. //
B. /*
C. <!--
D. #

6 In DAX syntax, how is a column reference typically formatted?

A. ColumnName[TableName]
B. 'TableName'[ColumnName]
C. [TableName].ColumnName
D. {TableName}[ColumnName]

7 Which function serves as the 'safe' alternative to the division operator (/) to handle divide-by-zero errors?

A. CALCULATE
B. DIVIDE
C. QUOTIENT
D. SAFE.DIV

8 Which logical function allows you to evaluate multiple conditions and return a result corresponding to the first true condition?

A. SWITCH
B. IF
C. OR
D. COALESCE

9 What does the DAX function COUNTROWS return?

A. The count of distinct values in a column.
B. The sum of values in a specific column.
C. The count of non-blank values in a column.
D. The count of all rows in a specified table, regardless of content.

10 Which function is used to join two text strings together in DAX?

A. CONCATENATE
B. JOIN
C. APPEND
D. MERGE

11 What is the primary purpose of the CALCULATE function?

A. To calculate the row-by-row sum of a table.
B. To evaluate an expression in a modified filter context.
C. To perform arithmetic calculations like addition and subtraction.
D. To create a calculated table.

12 Which function returns a table that represents a subset of another table or expression?

A. VALUES
B. DISTINCT
C. RELATED
D. FILTER

13 The RELATED function works only when...

A. You are using DirectQuery mode.
B. You are creating a measure.
C. The tables are in the same database.
D. There is a relationship between tables.

14 Which of the following is an example of an Iterator function?

A. MAX
B. COUNT
C. SUMX
D. SUM

15 What is the result of using the ALL function on a table?

A. It deletes all filters permanently from the model.
B. It returns all rows in a table, ignoring any filters that might have been applied.
C. It selects all distinct values.
D. It aggregates all columns.

16 What function would you use to extract the year from a date column?

A. CALENDAR
B. YEAR
C. GETYEAR
D. DATE

17 Which text function removes all spaces from text except for single spaces between words?

A. CLEAN
B. TRIM
C. REPLACE
D. SUBSTITUTE

18 Which operator is used for logical OR in DAX?

A. ==
B. ||
C. &&
D. <>

19 What is the return type of the TODAY() function?

A. Integer
B. Date
C. Date and Time
D. Text string

20 Which function counts the number of distinct values in a column?

A. COUNTA
B. COUNTROWS
C. DISTINCTCOUNT
D. COUNT

21 Which of the following is NOT a valid DAX logical function?

A. AND
B. NOT
C. WHEN
D. IF

22 To create a measure that calculates Sales only for the 'Red' color products, which formula is correct?

A. IF(Product[Color] = 'Red', SUM(Sales[Amount]))
B. CALCULATE(SUM(Sales[Amount]), Product[Color] = 'Red')
C. SUM(Sales[Amount]) WHERE Product[Color] = 'Red'
D. FILTER(Sales, Product[Color] = 'Red')

23 What is the difference between NOW() and TODAY()?

A. NOW is static; TODAY updates on refresh.
B. They are identical.
C. TODAY returns Date and Time; NOW returns only the Date.
D. NOW returns Date and Time; TODAY returns only the Date.

24 Which function allows you to use an inactive relationship between two tables for a specific calculation?

A. RELATED
B. USERELATIONSHIP
C. PATH
D. CROSSFILTER

25 What does the BLANK() function return?

A. An error
B. An empty string
C. Zero
D. A null value

26 Which function would you use to calculate the number of days between two dates?

A. DATEADD
B. SUBTRACT
C. DATEDIFF
D. DAYS360

27 In the context of DAX, what is 'Row Context'?

A. The hierarchy of drill-down data.
B. The relationship between two tables.
C. The set of filters applied to a report visual.
D. The concept that formulas iterate row by row in calculated columns or iterators.

28 Which function replaces existing text with new text in a text string?

A. SWAP
B. REPLACE
C. CHANGE
D. SUBSTITUTE

29 What is the purpose of the DISTINCT function?

A. It removes duplicate rows from a table expression.
B. It returns a one-column table that contains the distinct values from the specified column.
C. It counts unique values.
D. It filters a table for unique keys.

30 Which DAX function creates a table with a single column of dates covering a specified range?

A. CALENDAR
B. YEARFRAC
C. TODAY
D. DATE

31 When using RELATEDTABLE, what type of result is returned?

A. A single value.
B. A table of values related to the current row.
C. A count of rows.
D. A Boolean true/false.

32 Which function returns the last date in the current context for the specified column of dates?

A. LASTDATE
B. CLOSINGBALANCEMONTH
C. ENDOFYEAR
D. MAX

33 The LEN function is used to:

A. Return the number of characters in a text string.
B. Calculate the length of a time period.
C. Measure the file size.
D. Count the number of rows in a table.

34 Which operator is used to check if a value is NOT equal to another?

A. ~=
B. NOT
C. <>
D. !=

35 What is the primary benefit of using variables (VAR) in DAX?

A. They allow you to write SQL queries.
B. They automatically format the output as currency.
C. They create global parameters for the whole report.
D. They improve readability and performance by calculating a value once and reusing it.

36 Which function returns the arithmetic mean of all the numbers in a column?

A. AVERAGE
B. MEDIAN
C. MEAN
D. SUM

37 If you want to handle errors in a calculation specifically, which function is best?

A. ERROR
B. ISERROR
C. IFERROR
D. IF

38 Which function moves the given set of dates by a specified interval?

A. DATEADD
B. SAMEPERIODLASTYEAR
C. PARALLELPERIOD
D. DATESINPERIOD

39 How does the ALLSELECTED function differ from ALL?

A. ALLSELECTED removes filters from rows and columns but preserves filters from slicers/visuals outside the current visual.
B. ALLSELECTED only works on selected text.
C. ALLSELECTED removes absolutely all filters including slicers.
D. There is no difference.

40 Which text function extracts characters from the middle of a text string?

A. CENTER
B. SUBSTR
C. MID
D. MIDDLE

41 What is the output of the DAX expression: 5 + BLANK()?

A. Error
B. BLANK
C. 0
D. 5

42 Which function is used to calculate values over a set of dates that corresponds to the same period in the previous year?

A. SAMEPERIODLASTYEAR
B. DATEADD
C. DATESYTD
D. PREVIOUSYEAR

43 In a measure formula, what is the role of the RETURN keyword?

A. It restarts the calculation.
B. It returns the user to the report view.
C. It outputs the result when using variables (VAR).
D. It is used to loop through rows.

44 Which function evaluates a logical test and returns one value if TRUE and another if FALSE?

A. SWITCH
B. EVALUATE
C. TRUE
D. IF

45 What function is used to aggregate data based on a parent-child hierarchy in DAX?

A. PATH
B. PATHITEM
C. PATHLENGTH
D. All of the above

46 Which function returns the standard deviation of a sample population?

A. STDEV.S
B. VAR.S
C. STDEV.P
D. AVERAGE

47 What is the purpose of the VALUES function?

A. To return a one-column table of unique values from a column, respecting the current filter context.
B. To return a list of all measures.
C. To sum up values.
D. To convert text to numbers.

48 Which iterator function would you use to find the highest value of an expression evaluated for every row in a table?

A. MAXX
B. SUMX
C. HIGHEST
D. MAX

49 Which date function returns the number of the week in the year (1-54)?

A. WEEK
B. DAY
C. WEEKDAY
D. WEEKNUM

50 What is Filter Context?

A. The relationship between tables.
B. The set of filters applied to the data model by slicers, visuals, and report filters at the moment of calculation.
C. The syntax checking of the formula.
D. The context applied by the row currently being iterated.