DAX Logical Functions MCQS

Q. What does the IF() function do in DAX?

A
Sums a column
B
Returns one value if a condition is true and another if false
C
Removes duplicate rows
D
Removes duplicate rows
Solution:

IF() is a basic conditional function returning one of two results based on a test.

Q. Which function requires both supplied conditions to be true?

A
OR()
B
AND()
C
SWITCH()
D
IF()
Solution:

AND() only returns true when both conditions it’s given are true.

Q. What is SWITCH() best used for?

A
Evaluating an expression against multiple possible values in one readable block
B
Evaluating an expression against multiple possible values in one readable block
C
Connecting to a database
D
Formatting currency
Solution:

SWITCH() replaces multiple nested IF() statements with a flatter, more readable structure.

Q. What is the common pattern SWITCH(TRUE(), ...) used for?

A
What is the common pattern SWITCH(TRUE(), ...) used for?
B
Always returning TRUE
C
Disabling a measure
D
Creating a calculated table
Solution:

 SWITCH(TRUE(), condition1, result1, condition2, result2, …) lets you evaluate a series of independent conditions in order.

Q. What happens if a SWITCH() formula has no matching condition and no default value?

A
It throws a syntax error at write time
B
It returns blank
C
It returns 0 automatically
D
It returns the first option regardless
Solution:

Without a default final value, SWITCH() returns blank for any row that doesn’t match a listed condition.

Q. How many conditions can AND() or OR() accept directly?

A
Unlimited
B
Exactly two
C
Only one
D
Exactly four
Solution:

 AND() and OR() each take exactly two arguments; more conditions require nesting or the && / || operators.

Q. Why might a developer choose SWITCH() over three nested IF() statements?

A
To improve readability and make the logic easier to maintain as more conditions are added
B
Because IF() cannot handle text results
C
Because nested IF() is not valid DAX
D
Because SWITCH() runs on a different engine
Solution:

Deeply nested IF() statements become hard to read; SWITCH() flattens the same logic into a linear, more maintainable structure.

Entri PDF Icon

Get Question Bank

Strengthen Your Practice with our comprehensive question bank.