Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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]
)
@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
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 32 | |
| 19 | |
| 12 | |
| 10 |