DAX Variables MCQS

Q. What keyword declares a DAX variable?

A
LET
B
VAR
C
DEFINE
D
SET
Solution:

DAX uses the VAR keyword to declare a variable.

Q. What keyword returns the final result of a DAX formula that uses variables?

A
END
B
RESULT
C
RETURN
D
RETURN
Solution:

RETURN provides the final expression after one or more VAR declarations.

Q. What is the main benefit of using a variable instead of repeating an expression?

A
It disables the formula
B
Improved readability and, often, performance
C
It changes the data type automatically
D
It removes the need for CALCULATE
Solution:

 Naming a repeated expression once improves both readability and, since it’s evaluated once, often performance.

Q. How many RETURN statements does a VAR-based DAX formula need?

A
One, at the end
B
One per VAR declared
C
None are required
D
None are required
Solution:

A chain of VAR declarations ends with a single RETURN statement.

Q. Can a DAX variable declared in one measure be reused in a different measure?

A
Yes, automatically
B
No — a variable's scope is limited to the formula it's declared in
C
Only if both measures are in the same table
D
Only for calculated columns
Solution:

DAX variables are scoped to the single formula they’re declared in and can’t be reused elsewhere.

Q. What's a practical way to debug a specific variable's value inside a formula?

A
Delete the variable and retype it
B
Temporarily change RETURN to just that variable's name
C
Rename the measure
D
Republish the report
Solution:

 Returning a single variable in isolation lets you inspect its value without dismantling the rest of the formula.

Entri PDF Icon

Get Question Bank

Strengthen Your Practice with our comprehensive question bank.