How to add a calculated column in Microsoft Power BI

| Uzair Iftikhar

If you’re familiar with Power BI measures, you might be wondering about the difference between those and calculated columns. Both are based on Data Analysis Expressions (DAX). The main difference is that you usually add a measure to a visualization by adding it to the Values bucket. In contrast, a calculated column is a new field that can be added to rows, axes, legends and groups.

Calculated columns and measures might seem interchangeable, and sometimes it won’t matter. When deciding which to use, context is the determining factor

Power BI uses measures with visualizations and updates them after a filter is applied. The formula often includes an aggregate function to evaluate groups.

To add a calculated column to the Products table:

1- Right-click Products in the Fields pane, and choose New Column. Power BI names the new column “Column,” by default, and Power BI will open the formula bar in response.

2- In the formula bar, enter Simple Profit Margin = Product[List Price] - Product[Standard Cost]. Overwrite the default “Column =” text.

3- Click the checkmark to the left to add the new column Figure A.

Double-click the field or drag it to the Rows bucket to update the visualization. Remember, if you base a visualization on the Products table and add the new column to it, Power BI will calculate the profit margin before the user clicks a filter. In addition, Power BI stores the profit values in the model, so they are available to other visualizations.

Join us next time, as we continue our journey of learning canvas apps.Click here to learn more about Imperium's Power Apps Services. We hope this information was useful, and we look forward to sharing more insights into the Power Platform world.


M
Chief Architect, Founder, and CEO - a Microsoft recognized Power Platform solution architect.

About The Blog

Stay updated with what is happening in the Microsoft Business Applications world and initiatives Imperium is taking to ease digital transformation for customers.


More About Us

We provide guidance and strategic oversight to C-Suite and IT Directors for on-going implementations. Feel free to give us a call.

1 331 250 27 17
Send A Message

Ready to Start?

Get a personalized consultation for your project.

Book a Meeting