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,
In the following image, How can i get the total for a new column as 1300 (Sum of 800+500) but individual row as 800, 500 group by header id (see image below)?
Thanks in advance!
Solved! Go to Solution.
Hey @sb991986 ,
for a measure and also for a calculated column the following formula should work:
New Column =
CALCULATE(
SUM( myTable[Revenue] ),
ALLEXCEPT( myTable, myTable[Header ID] )
)
Hi @sb991986
Try meausre as:
Measure =
var _sum=
SUMX(
FILTER(
ALL('Table'),
'Table'[Header ID]=MAX('Table'[Header ID])
),
'Table'[Revenue]
)
return
IF(
HASONEVALUE('Table'[Revenue]),
_sum,
SUM('Table'[Revenue])
)
Here is the output:
The pbix is attached.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
Hey @sb991986 ,
for a measure and also for a calculated column the following formula should work:
New Column =
CALCULATE(
SUM( myTable[Revenue] ),
ALLEXCEPT( myTable, myTable[Header ID] )
)
Hi,
In the above example, I would need total as 1300 but individual row as 800, 500 by header id & detail id. Thank you
Hi,
In the above example, I would need total as 1300 but individual row as 800, 500 by header id & detail id
@sb991986 , Try like
sumx(values(Table[Header ID]), calculate(sum(Table[revenue]), filter(allselected(Table), Table[Header ID] = max(Table[Header ID]))))
I tried your logic but it didn't work. Thank you fro your help
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!