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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
nok
Advocate II
Advocate II

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors