There are a couple of ways to do this, here's one method:
1) Create a calculated field for the total of A that is TOTAL(SUM(IF [PeriodCd] = "A" THEN [TRAVELS] + [MARKETING & SALES] + ...))
2) Create a second calculated field for the total of B that is just like the one in #1, except using "B" in the IF statement
3. Create a third calculated field for the difference that is [A]-[B]
4. Use that as a measure in the chart, while removing the PeriodCd from the Rows shelf.
Another method would be to use a table calculation with a LOOKUP(), but that would be more complex and somewhat dependent on your data.
Thanks - this is indeed what I was looking for. This will really help me a lot.