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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register 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
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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