It depends how the data and your views are set up, but you could potentially just use a single select quick filter if A and B are in the same dimension.
Otherwise, if they are two separate measures, a string parameter could be used--listing out A, B and Both. Then, create a calculated field similar to:
when 'A' then sum(A)
when 'B' then sum(B)
when 'Both' then sum(A) + sum(B)
Hope this helps!