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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Joak
Frequent Visitor

Summarize issue

Hello, 

 

In a new table, I want to summarize a column; and then sum the values that are matching together : 

 

ExistingTable-

 

Column A              Values

A                                2

A                                2

A                                4

B                                1

B                                 1

B

 

New Table-

 

Column A            Values

A                              8

B                              2

 

 

I'm Using this code : 

 

New table = SUMMARIZE(
' ExistingTable ' ;
' ExistingTable ' [Column A] ;
Sum ( ' Existing Table ' [Values] )

I'm wondering why wouldn't that be working ? 

 

Thanks 🙂

1 ACCEPTED SOLUTION

@Joak,

 

You may use GROUPBY Function as well. By the way, to help close this thread, accept the solution above. Your contribution is highly appreciated.

New table =
GROUPBY (
    ExistingTable,
    ExistingTable[Column A],
    "Values", SUMX ( CURRENTGROUP (), ExistingTable[Values] )
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
TomMartens
Super User
Super User

Hey,

 

I guess your Table-Calculation should look like this

 

New table = SUMMARIZE(
  ' ExistingTable ' ;
  ' ExistingTable ' [Column A] ;
  "Values", Sum ( ' Existing Table ' [Values] )
)

It seems your formula just missed a column name for the aggregated value.

 


And for a couple of reasons it also a good practice to take this article into account:

http://www.sqlbi.com/articles/best-practices-using-summarize-and-addcolumns/

 

Hope this helps



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Thanks, you're right it works now thanks for the highlight and the article ! 

 

 

@Joak,

 

You may use GROUPBY Function as well. By the way, to help close this thread, accept the solution above. Your contribution is highly appreciated.

New table =
GROUPBY (
    ExistingTable,
    ExistingTable[Column A],
    "Values", SUMX ( CURRENTGROUP (), ExistingTable[Values] )
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.