my guess is the second expression having result '1' instead of '2' in branch 1 and date 1/1/2014 because there are 2 different status in single customer (because one of the order result is failed and the other one result is delivered).
how to resolve that situation, so branch 1 result should be '2' and the total should be :
Branch 1 : 4
Branch 2 : 3
please help me..