Formula calculation on hidden fields

Formula calculation on hidden fields

Hello everyone

I have a formula that includes several fields
Some fields can be hidden according to different conditions

Is there a way to define that the formula will only calculate the fields that are not hidden?