In Power BI, calculated columns and calculated measures are essential for performing calculations on your data. Here’s how you can create both:

1. Creating Calculated Columns:
A calculated column is a new column added to a table in your data model using a DAX (Data Analysis Expressions) formula. Calculated columns are static, meaning they are calculated row by row and their values are stored in the data model.
You can also watch the demo video: 3 Ways to Add a Calculated Column in Power BI. Click here
Steps to Create a Calculated Column:
- Open Power BI Desktop and load your data.
- Go to Data View (on the left sidebar, it looks like a table icon).
- Select the table where you want to add the calculated column.
- On the Modeling tab, click New Column.
- In the formula bar, write your DAX formula for the new column.
Example:
If you have a Sales table and want to create a calculated column for profit, you can write:
DAX Code:Profit = Sales[Revenue] - Sales[Cost]
This will create a new column in your Sales table that shows the profit for each row.
2. Creating Calculated Measures:
A calculated measure is a dynamic calculation that is evaluated based on the context of the report, like filters, rows, and columns. Measures are not stored in the data model like calculated columns; instead, they are calculated on the fly when used in visualizations.
Steps to Create a Calculated Measure:
- Go to Report View or Data View in Power BI Desktop.
- Select the table in which you want to store the measure (measures can be stored in any table, but logically storing them with related data is recommended).
- On the Modeling tab, click New Measure.
- In the formula bar, write your DAX formula for the measure.
Example:
If you want to create a measure to calculate total sales, you can write:
DAX Code:Total Sales = SUM(Sales[SalesAmount])
This measure dynamically calculates the total sales based on the context, such as the filters applied in the report.
Differences between Calculated Columns and Measures:
- Calculated Columns are calculated row by row when the data is loaded or refreshed and their values are stored in the data model.
- Measures are calculated dynamically based on the current context in reports, such as slicers and filters.
- Performance: Calculated columns take up storage in the data model, while measures only consume memory when being calculated.
Click here to watch short video on Calculated Columns Vs Measures
Key Points:
- Use calculated columns when you need to add extra information to your data model that can be calculated row by row.
- Use measures for aggregations, calculations, and KPI indicators that need to respond dynamically to user interactions with the report.
These are the fundamental steps to create calculated columns and measures in Power BI. Let me know if you need further clarification!