Sum of records in field if another field equals value
I have a row of products that show: ID, Product Name, Travel(checkbox), Discount(checkbox), Qty, Price, Extended Price.
I then have a group of Totals group of fields: Subtotal, Discounts, Travel, Total.
What I am asking is if I can make it so when I click the Discount checkbox, to add the extended price to the Discount totals field.
I am trying to do it with a calculation on the Discount field.
So ideally, this is what I would like except in correct format: if discount field = checked, add to discount field
Thanks - let me know if I am not clear enogh.