Search code examples
ms-accessreport

MS ACCESS: Exclude a subtotal of a primary group from a grand subtotal


I've got a budget report that is broken down by category. Included in these categories is an OPTIONAL section. I would like to show the OPTIONALS in the main report but exclude them from the grand total. Everything works perfectly except I cannot figure out how to exclude (or subtract) the OPTIONALS. Please see attached image of design view of report. Thanks!![enter image description here]1


Solution

  • It would be something like this:

    =Sum(IIf(Category_Optional=True,0,Value))
    

    Where Category_Optional=True is any kind of record expression that defined whether you want to exclude a record from the subtotal or not and value is the field you are getting a subtotal on.