Grouping a list of values 0 and -1

Hello!
I need help.
In the picture you can see I want to achieve a state but can not find a solution.
I would like to ask for help.

(I apologize for my English)
Thanks!

Hello Student,

Your problem looks very similar to this thread:

Thank you very much for your help!

@stu87dent Next time please reply it back soon instead of replying after one month.

And also mark the post as solved if it is solved.

I apologize for the late reply but I traveled.
The last issue is resolved, however, another problem I can not solve.
I would like to ask for help to solve the problem in the picture.

(I apologize for my English)
Thanks!

@stu87dent For your another problem start a new topic please. For now i will close this topic as it solved by @Vikram_Subbaiah. Thanks :slight_smile: