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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Need to sum subsets of rows based on values in another column

I am trying to sum up chunks of rows within a specific column based on the values of another column. I have been trying to use the filter function but I am not trying to sum based on one unique value but rather an array of unique values in the reference column:

Capture.PNG

 

I would like like to sum up all the rows in column 'PPV Spend' that have same 'Plant_Mat' code and return that value in a new column.

1 REPLY 1
Anonymous
Not applicable

Total PPV Spend Within Same Plant_Mat = -- this is a calculated column
var __currentPlantMat = T[Plant_Mat]
var __sum =
	SUMX(
		filter(
			T,
			T[Plant_Mat] = __currentPlantMat
		),
		T[PPV Spend]
	)
return
	__sum

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.