Lesson 3: Model Data in Power BI
Introduction
Understand DAX calculation Types
What is DAX Formula?
DAX Data Types
Work with DAX functions
Use DAX operators
Use DAX variables
Check your knowledge

Summary
In this module, you learned how to use DAX to add calculations to your model. You explored three types of calculations:
- Calculated tables
- Calculated columns
- Measures
You also learned the basics of DAX, including:
- Writing formulas
- Using different data types
- Applying functions, operators, and variables
- Referencing model objects and constants
DAX Formulas Knowledge Test - PL-300 Standard
Instructions: This quiz covers all key concepts from "Write DAX formulas for semantic models." Choose the best answer for each question. Solutions are provided at the end.
Section 1: DAX Calculation Types
Question 1
Which DAX calculation type is evaluated at query time and never stored in the model?
A) Calculated Table
B) Calculated Column
C) Measure
D) Row-level Security Rule
Question 2
You need to create a table containing only customers with sales > $10,000 for analysis. Which approach should you use?
A) Create a calculated column in the Customer table
B) Create a calculated table using FILTER function
C) Create a measure with FILTER function
D) Use Power Query to filter the data
Question 3
In a role-playing dimension scenario with OrderDate and ShipDate, what's the recommended approach?
A) Use USERELATIONSHIP function in all calculations
B) Create two separate date tables with active relationships
C) Keep one relationship active and one inactive
D) Create calculated columns for both dates
Question 4
Which statement about calculated columns is FALSE?
A) They are evaluated row by row
B) They increase model storage size in Import mode
C) They are evaluated at query time
D) They can be used to create relationships between tables
Section 2: DAX Formula Structure
Question 5
What is the correct way to reference a column named "Sales Amount" in the "Sales" table?
A) Sales.Sales Amount
B) Sales[Sales Amount]
C) [Sales Amount]
D) "Sales Amount"
Question 6
When should you use single quotes around a table name?
A) Always
B) Never
C) When the table name contains spaces or is a reserved keyword
D) Only for calculated tables
Question 7
Which reference is correct for a measure named "Total Revenue"?
A) Sales[Total Revenue]
B) [Total Revenue]
C) "Total Revenue"
D) Total Revenue
Section 3: DAX Data Types
Question 8
What does the BLANK data type represent in DAX?
A) Zero value
B) Empty string
C) Absence of a value
D) Boolean FALSE
Question 9
In the expression [Revenue] = 0, when will this return TRUE?
A) Only when Revenue equals zero
B) When Revenue equals zero OR is BLANK
C) Only when Revenue is BLANK
D) Never, this syntax is invalid
Question 10
What's the difference between = and == operators?
A) No difference, they work the same
B) == treats BLANK as zero, = does not
C) = treats BLANK as zero, == does not
D) == is used for text, = for numbers
Section 4: DAX Functions
Question 11
Which function should you use to safely perform division and avoid division by zero errors?
A) IF function with error checking
B) DIVIDE function
C) IFERROR function
D) Standard division operator (/)
Question 12
What does the DISTINCTCOUNT function calculate?
A) Total number of rows in a table
B) Number of non-blank values in a column
C) Number of unique values in a column
D) Number of duplicate values in a column
Question 13
Which DAX function would you use to create a date table?
A) DATEADD
B) CALENDAR or CALENDARAUTO
C) DATEDIFF
D) TODAY
Section 5: DAX Operators
Question 14
What is the correct operator precedence order (highest to lowest)?
A) +, -, *, /, ^
B) ^, *, /, +, -
C) *, /, ^, +, -
D) ^, +, -, *, /
Question 15
In the expression Sales[Quantity] * Sales[Price] * 1 - Sales[Discount], what's the issue?
A) Syntax error
B) Wrong operator precedence - should use parentheses
C) Missing table reference
D) No issue, the expression is correct
Question 16
Which logical operator creates an OR condition between expressions?
A) &&
B) ||
C) AND
D) IN
Section 6: DAX Variables
Question 17
What are the main benefits of using VAR in DAX? (Select all that apply)
A) Improved readability
B) Better performance
C) Easier testing of complex formulas
D) Reduced model size
Question 18
In a VAR statement, what keyword is used to define the final expression?
A) END
B) RESULT
C) RETURN
D) OUTPUT
Question 19
Consider this measure:
Revenue YoY % =
VAR RevenuePriorYear =
CALCULATE([Revenue], SAMEPERIODLASTYEAR('Date'[Date]))
RETURN
DIVIDE([Revenue] - RevenuePriorYear, RevenuePriorYear)What does this measure calculate?
A) Revenue for the previous year
B) Revenue difference from previous year
C) Year-over-year revenue percentage change
D) Current year revenue only
Section 7: Advanced Concepts
Question 20
What happens to BLANK values in arithmetic operations?
A) They cause an error
B) They are treated as zero
C) They are ignored
D) They convert to NULL
Question 21
Which statement about implicit vs explicit measures is correct?
A) Implicit measures are written in DAX
B) Explicit measures are automatically created by Power BI
C) Implicit measures use simple aggregations like SUM, COUNT
D) There's no difference between them
Question 22
When creating a calculated table for a role-playing dimension, the new table:
A) Must be related to the original table
B) Should have an active relationship to the fact table
C) Cannot be used in relationships
D) Is automatically created by Power BI
Question 23
Which scenario would require a calculated table rather than a calculated column?
A) Adding a profit margin calculation
B) Creating a customer age group
C) Building a what-if parameter table
D) Concatenating first and last names
Question 24
In DAX, when should you use the IN operator?
A) To check if a value exists in a list of values
B) To perform addition operations
C) To create relationships
D) To define variables
Question 25
What's the recommended approach for formatting complex DAX formulas?
A) Write everything on one line
B) Use spaces, tabs, and line breaks for readability
C) Only use line breaks, no spaces
D) Formatting doesn't matter in DAX
Answer Key & Explanations
Scoring Guide:
- 23-25 correct: Excellent - Ready for PL-300
- 20-22 correct: Good - Review weak areas
- 15-19 correct: Fair - More study needed
- Below 15: Needs Work - Fundamental review required
Section 1 Answers:
1. C) Measure - Measures are calculated at query time and never stored in the model.
2. B) Create a calculated table using FILTER function - Calculated tables can filter and transform existing data.
3. B) Create two separate date tables with active relationships - This is the recommended approach for role-playing dimensions.
4. C) They are evaluated at query time - FALSE. Calculated columns are evaluated at data refresh time, not query time.
Section 2 Answers:
5. B) Sales[Sales Amount] - Correct syntax uses table name and column in square brackets.
6. C) When the table name contains spaces or is a reserved keyword - Single quotes are needed for special cases.
7. B) [Total Revenue] - Measures should be referenced without table prefixes.
Section 3 Answers:
8. C) Absence of a value - BLANK represents the absence of a value, similar to NULL in SQL.
9. B) When Revenue equals zero OR is BLANK - The = operator treats BLANK as zero.
10. C) = treats BLANK as zero, == does not - Strict equality (==) doesn't treat BLANK as zero.
Section 4 Answers:
11. B) DIVIDE function - DIVIDE automatically handles division by zero cases.
12. C) Number of unique values in a column - DISTINCTCOUNT counts distinct values.
13. B) CALENDAR or CALENDARAUTO - These functions create date tables.
Section 5 Answers:
14. B) ^, *, /, +, - - Exponentiation has highest precedence, then multiplication/division, then addition/subtraction.
15. B) Wrong operator precedence - should use parentheses - Multiplication happens before subtraction, affecting the discount calculation.
16. B) || - Double pipe creates OR condition.
Section 6 Answers:
17. A, B, C) Improved readability, Better performance, Easier testing - All except reduced model size.
18. C) RETURN - RETURN keyword defines the final expression.
19. C) Year-over-year revenue percentage change - The formula calculates YoY percentage change.
Section 7 Answers:
20. B) They are treated as zero - BLANK values are treated as zero in arithmetic operations.
21. C) Implicit measures use simple aggregations like SUM, COUNT - Implicit measures are simple aggregations.
22. B) Should have an active relationship to the fact table - The new table should have an active relationship.
23. C) Building a what-if parameter table - What-if parameters require calculated tables.
24. A) To check if a value exists in a list of values - IN operator checks membership in a list.
25. B) Use spaces, tabs, and line breaks for readability - Formatting improves readability without affecting performance.
Key Study Areas Based on Common Mistakes:
🔍 Focus Areas:
- Operator precedence - Practice complex expressions with parentheses
- BLANK handling - Understand difference between
=and== - Variable benefits - Know why VAR improves performance and readability
- Calculation types - When to use tables vs columns vs measures
- Function selection - DIVIDE vs
/, DISTINCTCOUNT vs COUNT
💡 Pro Tips for PL-300:
- Always use DIVIDE for division operations
- Understand filter context and row context differences
- Practice time intelligence functions
- Know when to use calculated tables vs Power Query
- Master the relationship between measures and filter context