How to Sum Multiple Columns in Power BI (With Example)


You can use the following syntax in DAX to sum the values across multiple columns of a table in Power BI:

Sum Points = CALCULATE(SUMX('my_data', [Game 1] + [Game 2] + [Game 3]))

This particular formula creates a new column named Sum Points that contains the sum of the values in the Game 1, Game 2 and Game 3 columns for each row in the table named my_data.

The following example shows how to use this formula in practice.

Example: How to Sum Multiple Columns in Power BI

Suppose we have the following table in Power BI named my_data that contains information about points scored by various basketball players during three different games:

Suppose we would like to create a new column that shows the sum of points scored by each player across all three games.

To do so, click the Table tools tab, then click the New column icon:

Then type the following formula into the formula bar:

Sum Points = CALCULATE(SUMX('my_data', [Game 1] + [Game 2] + [Game 3]))

A new column named Sum Points will be created that shows the sum of the points scored by each player across all three games:

Power BI sum multiple columns

From the output we can see:

  • The Mavs player scored a total of 14 + 5 + 10 = 29 points.
  • The Spurs player scored a total of 10 + 17 + 12 = 39 points.
  • The Rockets player scored a total of 22 + 18 + 12 = 52 points.

And so on.

Note: You can find the complete documentation for the SUMX function in DAX here.

Additional Resources

The following tutorials explain how to perform other common tasks in Power BI:

Power BI: How to Calculate Sum with Filter
Power BI: How to Use SUM IF
Power BI: How to Calculate a Cumulative Sum

2 Replies to “How to Sum Multiple Columns in Power BI (With Example)”

Leave a Reply

Your email address will not be published. Required fields are marked *