Forum Discussion

Joak's avatar
Joak
Frequent Visitor
9 years ago
Solved

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 :)

  • 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] )
    )
    

3 Replies

    • Joak's avatar
      Joak
      Frequent Visitor

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

       

       

      • v-chuncz-msft's avatar
        v-chuncz-msft
        Community Support

        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] )
        )