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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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]
)


Microsoft MVP



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.




LinkedInVisit my LinkedIn page




Outlook BookingSchedule 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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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