I take snapshots of the total machines every quarter then display the trend. Now the user wants a comparative analysis of the machines. For example, they want to able to compare two quarters at a time and want to know the machines that were decommissioned and the new ones added. Here is the data set
2013 Q1
A
B
C
D
2013 Q2
B
C
E
F
G
2013 Q3
E
F
H
I
Q! vs Q2
Cancels: 2(A,D)
Adds : 3(E,F,G)
Q2 vs Q3
Cancels : 3(B,C,G)
Adds : 2(H,I)
Q1 vs Q3
Cancels : 4(A,B,C,D)
Adds : 4(E,F,H,I)
How do I compute these adds and cancels on the front end for random selections of quarters?