How to Add Two Columns in Power BI Measure

Cody Schneider••9 min read

Trying to add two columns together in Power BI is a common task, but it’s not as straightforward as adding cells in a spreadsheet. How you combine your data can significantly impact your report’s performance, flexibility, and the accuracy of your insights. This tutorial will guide you through the best methods for adding columns, clearing up the essential difference between a Calculated Column and a Measure, and showing you the right DAX formula for any situation.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Why Understanding "Context" is So Important

Before writing any DAX (Data Analysis Expressions), it’s helpful to understand the concept of "context." If you’ve ever tried to create a new measure and typed = 'Sales'[Revenue] + 'Sales'[Tax] only to be met with an error, you’ve encountered context without realizing it. Power BI doesn't know which row's revenue to add to which row's tax. Are you talking about the first row? The last one? The total of everything?

This is the difference between row context and filter context, and it’s the main reason we have two ways of making calculations: Calculated Columns and Measures.

  • Row context exists when a calculation is evaluating on a single row at a time. It knows exactly which values to use because it's looking at that one specific row.
  • Filter context exists when a calculation is being evaluated within a visual (like a chart or a table). It considers all the active filters, like slicers, other chart selections, or filter panel settings, to figure out what data to include in the aggregation.

Understanding this distinction is what separates confusing error messages from cleanly built, efficient reports. Let’s look at the two tools Power BI gives us to handle these contexts.

Measures vs. Calculated Columns: The Key Difference

Choosing between a measure and a calculated column is one of the most fundamental decisions you'll make in Power BI. They might seem similar, but they operate very differently and are used for entirely different purposes. Getting this right will save you countless headaches and improve your report's performance.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Calculated Columns

Think of a calculated column as adding a new, permanent column to your underlying table - just like you would in Excel. The calculation happens once for every single row during the data refresh process.

  • How it works: It operates under row context. As it goes through your table, row by row, it performs the calculation you've defined and stores the result.
  • When to use it: Use a calculated column when you need a static value that's fixed for each row. A great example is concatenating text (e.g., [FirstName] & " " & [LastName] to create a 'FullName' column) or creating a category based on another value (e.g., if 'Price' > 100, then "High Value," else "Standard").
  • Performance impact: Because the results are stored in your model, calculated columns increase the file size and use more RAM. With very large datasets (millions of rows), having too many complex calculated columns can slow things down.

Measures

A measure is a dynamic calculation that runs on-the-fly based on what a user is doing in the report. It doesn’t store any values in your table, instead, it calculates a result based on the current context, like what a user has selected in a slicer or clicked on in a bar chart.

  • How it works: It operates under filter context. It calculates an aggregation (like a sum, average, or count) across many rows, considering all active filters.
  • When to use it: Use a measure whenever you need to aggregate data. Nearly all your key performance indicators (KPIs) like Total Sales, Average Order Value, or Profit Margin should be measures.
  • Performance impact: Measures have a minimal impact on file size and RAM since they aren't pre-calculated. The computation happens when a visual is rendered, so very complex measures can occasionally feel slow on massive datasets, but they are generally the more efficient option.

With that foundation, let's explore the practical methods for adding two columns together.

Method 1: Row-by-Row Addition (Using a Calculated Column)

This is the most direct approach and what most people think of when they want to add two columns. It's perfect when you need to create a new attribute in your data for each and every row.

Let's say you have an e-commerce sales table with a column for 'Unit Price' and another for 'Shipping Cost'. You want to find out the total cost for each individual item sold.

Step-by-Step Instructions

  1. Navigate to the Data view by clicking the table icon on the left-hand sidebar in Power BI Desktop.
  2. Select the table you want to work with from the Fields pane on the right (e.g., 'Sales').
  3. From the Column tools tab in the top ribbon, click on New column.
  4. A formula bar will appear at the top. This is where you'll write your DAX formula. Type the following:

Total Item Cost = Sales[Unit Price] + Sales[Shipping Cost]

  1. Press Enter. You'll instantly see a new column appear in your table, with each row showing the sum of the unit price and shipping cost for that specific row.

That's it! You've successfully added two columns for every row. You can now use this 'Total Item Cost' column like any other column in your visualisations - for instance, you could drag it into a table visual to see the cost for each transaction.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Method 2: Adding Summarized Totals (Using a Simple Measure)

Sometimes, you don't care about the row-by-row sum. Instead, you want to add the total of one column to the total of another. For example, you might want a single KPI card that shows total revenue plus total tax, giving you a grand total billed amount.

In this case, we don’t need row context. We need to tell Power BI to first aggregate each column and then add those totals together. This is a perfect job for a simple measure.

Step-by-Step Instructions

  1. Make sure you are in the Report view (the first icon in the left-hand sidebar).
  2. From the Home tab in the ribbon, click on New measure. (You can also right-click your table in the Fields pane and select "New measure").
  3. The formula bar will appear. Here, we'll use an aggregation function, SUM(), for each column. Enter this formula:

Total Billed = SUM(Sales[Revenue]) + SUM(Sales[Tax])

  1. Press Enter. You won’t see anything change visually, but a new measure with a calculator icon will appear in your Fields pane.

This measure is now ready to use. If you drag it into a Card visual, it will show one single number: the sum of all revenue plus the sum of all tax based on your current filters. If you use it in a bar chart by region, it will dynamically calculate the total revenue + total tax for each region individually. This is the power of filter context in action.

Method 3: The Best of Both Worlds (Using SUMX in a Measure)

What if you need the best of both worlds? You need a row-by-row calculation, but you want it to be dynamic like a measure, without increasing your file size. This is a common need. For instance, you might have columns for 'Quantity' and 'Price' and need to calculate total revenue. The correct way is to multiply 'Quantity * Price' for each row and then sum up the results.

Doing this with a calculated column (Method 1) works, but it's not ideal for performance and flexibility. This is where iterator functions like SUMX() come into play. Iterator functions go through a table you specify, perform a calculation row-by-row in temporary memory, and then aggregate the final result.

Let's use our earlier example: adding 'Unit Price' and 'Shipping Cost', but this time to create a fully dynamic total analysis with a measure.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Step-by-Step Instructions

  1. Stay in the Report view and click New measure.
  2. In the formula bar, type the following SUMX formula:

Total Cost = SUMX('Sales', 'Sales'[Unit Price] + 'Sales'[Shipping Cost])

Let's break down this formula:

  • SUMX: This is our iterator. It tells Power BI to sum an expression.
  • 'Sales': The first argument is the table to iterate or loop over. Here, we're going through the 'Sales' table.
  • 'Sales'[Unit Price] + 'Sales'[Shipping Cost]: The second argument is the expression to perform for each row in the 'Sales' table.

This one measure is effectively executing the logic of Method 1 as a temporary step before summarising the result. The outcome is an entirely self-contained calculation that gives you an accurate result, dynamically responds to filters, and is the most performant and scalable solution of the three.

Which Method Should You Choose? A Quick Guide

Feeling a bit overwhelmed? Here’s a simple cheat sheet to help you decide.

Choose a Calculated Column If...

  • You need a fixed value added as new data to each row in your table (e.g., text concatenation).
  • You want to use the result in a slicer or as an axis label in a chart.
  • Your dataset isn’t massive, and you're not concerned about file size.

Choose a Simple Measure (like SUM() + SUM()) If...

  • You only care about adding the final aggregated totals of two columns.
  • Your logic is straightforward, like adding total revenue and total profit margin together on a dashboard.

Choose a SUMX Measure If...

  • You need to perform a row-by-row calculation (e.g., price * quantity, or cost + tax) and then aggregate the result.
  • You want the calculation to be dynamic and responsive to user filters.
  • You want to keep your data model lean, fast, and scalable. In most financial and sales analysis scenarios, this is the correct choice.

Final Thoughts

You now know the three primary methods for adding columns in Power BI - the row-by-row calculated column, the aggregated simple measure, and the flexible SUMX measure. Understanding the difference between these approaches and when to use each one is a fundamental step toward building efficient, accurate, and powerful Power BI reports that are easy to maintain and scale.

Of course, mastering DAX takes practice, and sometimes you just need a straightforward answer without building complex or troubleshooting formulas. This is why we created Graphed for situations where you need insights, not data projects. Rather than remembering DAX functions, you can ask questions in plain English like "Show me a chart of total sales by country last quarter" and get an interactive dashboard built for you instantly. If you find yourself spending more time inside the Power BI formula editor than making decisions from your data, you should see what Graphed can do for you.

Related Articles