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
user35131
Helper III
Helper III

Is there a way to summarize two columns and add a count aggregate column as third

I tried something like this 

 

    

 Sumamry Table = SUMMARIZE(Table,Table[race],Table[Borough],"Count",GROUPBY(Table,Table[race],Table[Borough]))
 
The third column count i would like to do sum or aggregate.
1 ACCEPTED SOLUTION
littlemojopuppy
Community Champion
Community Champion

Hi @user35131 

 

Try this...

Sumamry Table = 
GROUPBY(
	Table,
	Table,Table[race],
	Table[Borough],
	"ItemCount",
	COUNTX(
		CURRENTGROUP(),
		[whatever you're counting]
	)
)

This will group by and then count something (not sure of field name).  If you want to SUM() then change COUNTX() to SUMX() and substitute the appropriate field after CURRENTGROUP().

 

Hope this helps!

View solution in original post

2 REPLIES 2
littlemojopuppy
Community Champion
Community Champion

Hi @user35131 

 

Try this...

Sumamry Table = 
GROUPBY(
	Table,
	Table,Table[race],
	Table[Borough],
	"ItemCount",
	COUNTX(
		CURRENTGROUP(),
		[whatever you're counting]
	)
)

This will group by and then count something (not sure of field name).  If you want to SUM() then change COUNTX() to SUMX() and substitute the appropriate field after CURRENTGROUP().

 

Hope this helps!

Note: this will produce a summary table.  What @amitchandak suggested will produce a numeric value

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.

Top Solution Authors