Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi! I have a table:
person_id | value |
1022 | 0 |
1022 | 0 |
1022 | 0 |
1022 | 1 |
1022 | 0 |
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_id | value | sum |
1022 | 0 | 1 |
1022 | 0 | 1 |
1022 | 0 | 1 |
1022 | 1 | 1 |
1022 | 0 | 1 |
What dax formula I need to create a column "sum"
Solved! Go to Solution.
@Anonymous
Please use the following measure
M =
CALCULATE (
SUM( Table[Value]),
ALLEXCEPT ( table , table[person id])
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
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
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.
Schedule a short Teams meeting to discuss your question
@Anonymous
Please use the following measure
M =
CALCULATE (
SUM( Table[Value]),
ALLEXCEPT ( table , table[person id])
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Thanks a lot
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
11 | |
11 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |