How to Add Values in Power BI

Cody Schneider9 min read

Performing calculations is at the heart of any meaningful data analysis, and learning how to add values in Power BI is a fundamental step toward building insightful reports. Whether you need a simple sum of a sales column or a complex, filtered calculation, Power BI provides powerful tools to get the job done. This guide walks you through the essential methods, from simple visual aggregations to writing your first DAX formulas.

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

Calculated Columns vs. Measures: What's the Difference?

Before you start adding numbers, it’s important to understand the two primary ways Power BI performs calculations: calculated columns and measures. Choosing the right one is critical for building efficient and accurate reports.

Calculated Columns

A calculated column is just what it sounds like: a new column that you add to one of your tables. You create it using a DAX formula that calculates a value for every single row in that table. The results are then stored in your data model, increasing the size of your Power BI file.

  • When to use them: Use calculated columns when you need a static value for each row. They are perfect for categorizing data (like bucketing customers into "High Value" or "Low Value") or when you need to use the calculated result in a slicer, filter, or as an axis in a chart.
  • Example: If you have a 'Sales' table with Quantity and Unit Price columns, you could create a calculated column called Line Total with the formula [Quantity] * [Unit Price]. This calculation runs for each row when you refresh your data.
  • The Downside: Because they store a value for every row, calculated columns consume memory and can slow down your report, especially with large datasets.

Measures

A measure is a calculation that doesn't live on any specific row. Instead, its value is calculated on the fly based on the context of your report — meaning the filters applied by visuals, slicers, or other measures. Measures are for aggregating data.

  • When to use them: Measures are the go-to for almost all aggregation needs. If you need to calculate a total, average, percentage, or ratio that changes as users interact with the report, you need a measure.
  • Example: To get the total sales, you would create a measure like Total Sales = SUM(Sales[SalesAmount]). The result isn't stored, it’s calculated in real-time. If you put this measure on a card, it shows the grand total. If you put it in a bar chart with 'Country' as the axis, it calculates the sum of sales for each country dynamically.
  • The Upside: Measures are highly efficient and don't significantly increase the file size, making them the preferred method for aggregation.

Rule of thumb: If you need to see a calculated value in a table, row by row, use a calculated column. For everything else (totals, averages, ratios, etc. that will appear in a chart or card), use 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.

Method 1: The Quick and Easy Way with Visual Aggregations

The simplest way to add values in Power BI doesn’t even require writing a formula. You can perform basic summaries by simply dragging a field into a visual.

Let's say you want to see the total sales amount. Here's how:

  1. On the 'Visualizations' pane, select a visual, like the 'Card' visual which is perfect for showing a single number.
  2. From your 'Data' pane, find your 'Sales' table and locate a numeric column like SalesAmount.
  3. Drag the SalesAmount field and drop it into the 'Fields' well of the Card visual.

That's it! Power BI automatically defaults to summing the values, giving you the total. You can easily change this aggregation:

  • Click the small down arrow next to the SalesAmount field in the visual's field well.
  • A menu will appear with other options: Average, Minimum, Maximum, Count (Distinct), Count, Standard deviation, Variance, or Median.
  • Select the aggregation you need, and the visual will update instantly.

This drag-and-drop method is great for quick explorations and building simple visuals, but to unlock Power BI's full potential, you'll want to start using DAX.

Method 2: Using DAX to Create Measures for Aggregation

DAX (Data Analysis Expressions) is the formula language used in Power BI. While it may look intimidating at first, the basics are quite straightforward. Creating measures is the most common use case for DAX.

Creating Your First Measure with SUM()

The SUM() function adds up all the numbers in a column. It’s the workhorse of PBI measures. Let’s create a "Total Sales" measure.

  1. Right-click on the table where you want the measure to reside (e.g., the 'Sales' table) in the 'Data' pane and select New measure. You can also click 'New Measure' in the 'Modeling' tab in the ribbon.
  2. The formula bar will appear at the top of the report canvas.
  3. Type in your formula. Let's name the measure Total Sales:
Total Sales = SUM(Sales[SalesAmount])
  • Total Sales is the name you are giving your measure.
  • = separates the name from the formula.
  • SUM is the DAX function you are using.
  • (Sales[SalesAmount]) tells the function which table and column to sum up. The format is always 'TableName'[ColumnName].

After you press Enter, your new measure will appear in the 'Data' pane, identified by a small calculator icon. You can now drag this Total Sales measure into any visual, just like you did with a regular column.

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

Going Further with SUMX()

What if you don't have a SalesAmount column? What if you only have Quantity and Unit Price? You need to first multiply the quantity by the price for each row, and then sum up the results.

This is a perfect use case for the SUMX() function. The "X" functions in DAX are "iterator" functions, meaning they go through a table row by row, perform a calculation, and then aggregate the results.

Here’s how to create a total revenue measure using SUMX():

Total Revenue = SUMX(Sales, Sales[Quantity] * Sales[UnitPrice])

Breaking this down:

  • SUMX tells Power BI it needs to iterate.
  • Sales is the table it will iterate over (the first argument).
  • Sales[Quantity] * Sales[UnitPrice] is the expression it will calculate for each and every row in the 'Sales' table (the second argument).

Once it has calculated the total for every row, SUMX then adds up all those individual results to give you the grand total. This is a far more efficient method than creating a calculated column first, as it doesn't take up extra space in your data model.

Other common aggregation functions similar to SUM():

  • AVERAGE(): Calculates the average of a column.
  • COUNT(): Counts the number of non-blank rows in a column.
  • DISTINCTCOUNT(): Counts the number of unique values in a column.
  • MAX() / MIN(): Finds the highest or lowest value in a column.

Method 3: Creating a Calculated Column for Row-Level Additions

As we discussed, sometimes you genuinely need a result for each row. Let's return to our Line Total example, where we need to multiply the Quantity by the Unit Price for each sales transaction.

Here’s how to create that as a calculated column:

  1. Navigate to the 'Data View' by clicking the table icon on the left-hand navigation bar.
  2. Select the table you want to add the column to (e.g., 'Sales').
  3. In the 'Table tools' tab in the ribbon at the top, click New column.
  4. The formula bar appears. Enter your DAX formula:
Line Total = Sales[Quantity] * Sales[UnitPrice]

Notice the formula looks almost identical to the expression inside the SUMX measure. The key difference is the context. Here, an entire column is created in your table. For each row, Power BI looks at the value of [Quantity] in that specific row and matches it with the [UnitPrice] from the same row. Once created, you can see the new Line Total column in the data view and use it in your visuals — and even use this new column in a measure, like SUM(Sales[Line Total]).

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.

Adding Conditional Values with CALCULATE()

What if you want to add values, but only if they meet certain criteria? The CALCULATE() function is arguably the most powerful function in DAX, and its core job is to modify the filter context for a calculation.

Let’s say you want to calculate the total sales for just the "USA." You already have your [Total Sales] measure. You could wrap it in a CALCULATE() function like this:

USA Sales = CALCULATE([Total Sales], Sales[Country] = "USA")
  • The first argument is the expression you want to evaluate (our [Total Sales] measure).
  • The second argument is the filter you want to apply. Here, we're telling Power BI to only include rows where the Country column in the Sales table is equal to "USA" before summing them up.

This new USA Sales measure will always show the sales for the USA, regardless of whatever country is selected in a slicer or chart. It overrides the existing context, which makes CALCULATE an essential tool for complex reporting needs like Year-To-Date calculations, prior-period comparisons, and more.

Final Thoughts

Adding values in Power BI ranges from simple drag-and-drop visuals to complex conditional aggregations using DAX. Understanding whether to use a quick visual summary, a calculated column, or a measure is the key to creating efficient, scalable, and insightful reports. By starting with SUM and SUMX, you build a strong foundation for tackling any analytical challenge.

But mastering DAX and navigating Power BI's interface takes time and practice. At Graphed, we built an AI data analyst to simplify this entire process. Instead of creating measures or wrestling with CALCULATE(), you can connect your data sources and just ask your questions in plain English - like "Show me total sales by country compared to last month." Our platform automatically generates the live, interactive dashboards you need in seconds, letting you skip the learning curve and get straight to the insights. If you want a more intuitive way to get answers from your data, check out Graphed.

Related Articles