I'm trying to create a simple way to change the Total column to either -1, 1, or 0. When x=1, y=1, z=1, then Total=1. When x=-1, y=1, z=1, then Total=-1. In all other cases, Total=0. So, rows 2013-07-03 and 2013-07-05 should have Total=1. Row 2013-07-09 should have Total=-1. All other rows should have Total=0.
x y z Total
2013-07-01 1 1 0 0
2013-07-02 1 0 0 0
2013-07-03 1 1 1 1
2013-07-05 1 1 1 1
2013-07-08 0 0 1 0
2013-07-09 -1 1 1 -1
The product can be calculated thusly: