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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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