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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Sum of values per parameter

Hi! I have a table: 

person_idvalue
10220
10220
10220
10221
10220

And so on, so it is a column, where we have 5 values per one person, I need a column that will show the sum of those 5 values per person, so it will look like this:

person_idvaluesum
102201
102201
102201
102211
102201

What dax formula I need to create a column "sum"

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@Anonymous 

Please use the following measure 

M = 

CALCULATE (
    SUM( Table[Value]),
    ALLEXCEPT ( table , table[person id])
)




Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

4 REPLIES 4
daXtreme
Solution Sage
Solution Sage

Is this to be a measure or a calculated column? If a calc column...

[Sum] = // calc column
var vPerson = T[person_id]
var Result =
    SUMX(
        filter(
            T,
            T[person_id] = vPerson
        ),
        T[value]
    )
RETURN
    Result
Jihwan_Kim
Super User
Super User

Hi,

Please try the below to create a new column.

 

Sum CC =
SUMX (
    FILTER (
        'TableName',
        'TableName'[person_id] = EARLIER ( 'TableName'[person_id] )
    ),
    'TableName'[value]
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Fowmy
Super User
Super User

@Anonymous 

Please use the following measure 

M = 

CALCULATE (
    SUM( Table[Value]),
    ALLEXCEPT ( table , table[person id])
)




Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

Thanks a lot

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.