function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Erick BonifazErick Bonifaz 

Sum depending on ID

Hello Everyone!
I want to sum all rows depending on the ID. An example would be (See screenshot) sum all "Count" columns from ID 1 to one row, so ID 1 has 4 rows, each row has a 1 (highlighted in green) and the rest are 0's distributed on each column (See 1st table to understand more). The result I want is in table 2 which you can see is only one row but with the row sum combined so each column has a 1. In ID 2 you can see that only A_Count has ones so the result must be the ID 2 row with a count of 2 in A_Count, and the rest would be 0.
 
User-added image
Can someone help me with this? What method should I use to do this? Hope I explained well.

Thanks!