Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Grouping by a specific column

Hi   I have a table with 17 columns. 1 of them is receipt_ID and other is sales_amount. I need to sum or group all the same receipt_id into 1 sales_amount.   For example: receipt_ID sales_am...
  • amitchandak's avatar
    5 years ago

    Anonymous , a simple  measure with receipt id in visual should do

     

    sum(Table[sales_amount])

     

    or

     

    calculate(sum(Table[sales_amount]) , allexcept(Table, Table[receipt_id]))

     

     

    a new column

    sumx(filter(Table, table[receipt_id] = earlier(Table[receipt_id])) ,[sales_amount])