Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
nok
Helper III
Helper III

Create column that sums all values ​​with the same ID

Hello!

I have a table that follows this structure:

IDValue
A3
A5
B2
C7
D9
D2
D11
E5


I want to create a new column that will sum the value of the "Value" column for all the same IDs.

The expected result would be something like this:

ID     Value   SUM_ValueById
A38
A58
B22
C77
D922
D222
D1122
E55


How can I do this?

1 ACCEPTED SOLUTION
FarhanJeelani
Super User
Super User

Hi @nok  ,

You can achieve this by creating a calculated column in Power BI using DAX.

DAX Formula:

SUM_ValueById = CALCULATE( SUM('Table'[Value]), FILTER('Table', 'Table'[ID] = EARLIER('Table'[ID])) )


Please mark this as solution if it helps you. Appreciate Kudos.

View solution in original post

2 REPLIES 2
FarhanJeelani
Super User
Super User

Hi @nok  ,

You can achieve this by creating a calculated column in Power BI using DAX.

DAX Formula:

SUM_ValueById = CALCULATE( SUM('Table'[Value]), FILTER('Table', 'Table'[ID] = EARLIER('Table'[ID])) )


Please mark this as solution if it helps you. Appreciate Kudos.
rsbin
Super User
Super User

@nok ,

Your Calculated Column is:

SumID = CALCULATE( SUM([Value]),
           ALLEXCEPT( 'Table', 'Table'[ID] ))
 
Regards,

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors