Calculating "US government obligations" that are exempt from state tax

When calculating US Government Obligations to deduct from state tax, do I add both ordinary income and capital gains prior to applying  the US Government Obligations percentage? Thank you very much for your comments.