Module 4
5 min read
Calculated Columns
Master calculated columns in DAX
What are Calculated Columns?

Calculated columns add new columns to your tables using DAX formulas.
- Evaluated row-by-row during data refresh
- Stored in data model (uses memory)
- Can be used in slicers and filters
How to Create

- Click table in Fields pane
- Table Tools > New Column
- Type your formula
- Press Enter
Common Patterns

Text
| Pattern | Formula |
|---|---|
| Combine names | FullName = [FirstName] & " " & [LastName] |
| Add prefix | Code = "PROD-" & [ProductID] |
Dates
| Pattern | Formula |
|---|---|
| Extract year | Year = YEAR([OrderDate]) |
| Month name | Month = FORMAT([OrderDate], "MMMM") |
| Quarter | Quarter = "Q" & QUARTER([OrderDate]) |
Math
| Pattern | Formula |
|---|---|
| Profit | Profit = [Revenue] - [Cost] |
| With tax | PriceWithTax = [Price] * 1.1 |
Conditional
Status = IF([Amount] >= 1000, "VIP", "Regular")
Multiple conditions:
Tier = IF([Amount] >= 5000, "Platinum",
IF([Amount] >= 2000, "Gold", "Silver"))
Lookup (RELATED)
Get value from related table:
CategoryName = RELATED(Products[Category])
When to Use
| Use Calculated Column | Use Measure Instead |
|---|---|
| Filtering/slicing | Aggregations (SUM, AVG) |
| Row-level values | Dynamic calculations |
| Date parts | Totals that change with filters |
Quick Tips
- Prefer Power Query for simple transformations (faster)
- Use measures for aggregations, not columns
- Calculated columns increase file size
Most calculations should be measures. Only use calculated columns when you need to filter or slice by the result.