Calculated Columns

Create custom columns in your data model using DAX formulas.

Calculated Columns in DAX are custom columns that you create in your data model using DAX formulas. They are stored as part of the table, and the values are computed row by row based on existing data.

Key Characteristics of Calculated Columns

FeatureDescription
Row ContextEach row is evaluated individually when the DAX expression is applied.
Stored in MemoryOnce created, calculated columns are stored in the model and increase the model size.
Evaluated During Data RefreshCalculations happen when the data is loaded or refreshed not at query time.
Used Like Regular ColumnsYou can use them in visuals, slicers, filters, and even relationships.

Example

Assume you have a Sales table with columns Quantity and Price.

You can create a calculated column called TotalLineAmount:

TotalLineAmount = Sales[Quantity] * Sales[Price]

Each row in the Sales table will now have a new column that shows the total value for that row (quantity × price).

Calculated Columns vs. Measures:

FeatureCalculated ColumnMeasure
Stored in Table?YesNo
Row ContextUsedNot by default
Storage ImpactUses memoryCalculated on the fly
Use CaseRow-by-row logic (e.g., tax per product)Aggregations (e.g., total revenue)

When to Use Calculated Columns

Use a calculated column when:

  • You need a column for filtering, sorting, or grouping
  • You want to build relationships using a new field
  • The calculation is row-dependent, not aggregate-based
No questions available.