I've found answers to similar questions using SUMIFS, but not sure how to apply it to my case. Basically, I only want to include values from shown tables (not hidden tables) in a field calculation.
I have a form that allows the user to enter leave time based on days and/or hours. I have a checkboxes field, Vacation_DaysOrHours, with checkboxes for Days and Hours. Clicking on the Days checkbox shows the Leave_Days_Table table. Clicking on the Hours checkbox shows the Leave_Hours_Table table. I have a total Leave Hours field that calculates the sum of all hours entered in both tables. If a user enters hours in the Hours table, and then unchecks the Hours checkbox to hide it, I don't want those hours in the hidden table to be counted.
The current calculation for the total "Leave Hours" field is as follows:
I tried the following with no success: