How To Calculate Sum In Power Bi

In Power BI, you can calculate the sum of values using the SUM function. Here’s how you can do it:

  1. Create a table or visual in Power BI that contains the values you want to sum.
  2. Select the visual or the column where you want to calculate the sum.
  3. Go to the “Modeling” tab in the Power BI ribbon at the top.
  4. Click on the “New Measure” button in the “Calculations” group.
  5. A formula bar will appear, where you can enter the calculation formula.
  6. Type the following formula: SUM(column_name) or SUMX(table_name, column_name), where column_name is the name of the column containing the values you want to sum, and table_name is the name of the table that contains the column.
  7. Press Enter to apply the formula.

Here’s an example:

Let’s say you have a table called “Sales” that contains a column called “Revenue” which stores the sales revenue for each product. To calculate the sum of the sales revenue, you can create a measure called “Total Revenue” using the following formula:

SUM(Sales[Revenue])

This will calculate the sum of all the values in the “Revenue” column of the “Sales” table.

Once you have created the measure, you can use it in any visual or calculation in your Power BI report.

Similar post

Leave a comment