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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors