Forum Discussion

guilledo24's avatar
guilledo24
Regular Visitor
8 years ago
Solved

New column with total by id

Hi, I have the next table   ID  |  SALES 1   |    123 2   |    50 1   |    08 3   |    26 3   |    74 2   |    12 1   |    59   And i need to create a new column to have the total sales b...
  • Phil_Seamark's avatar
    8 years ago

    Hi guilledo24

     

    I think this calculated column gets pretty close

     

    Total = 
        CALCULATE(
            SUM('Table1'[Sales]), 
            FILTER(
                'Table1',
                'Table1'[ID]= EARLIER(Table1[ID])
                )
            )