I know this is probably easy/peezy for everyone on here but after lots of research, I still can't get my calc to fly right.
I have a lengthy accounting list of subaccounts.
Currently, I have a table with percentages based upon type of food to eat, and how much gets paid to supplier.
So, for instance, if the animal is a horse and the supplier sends EQS, then the percentage paid is 5% x 12 months up front; if the animal is a zebra, and the supplier sends EQS, then the percentage is 5% but only 1 month, for every other kind it is EQT x 1 month.
My current IIF statement reads:
PCTERND: IIF([subDE]="15",[amount]*[animal-mff]*12,IIf([subDE]="16",[ amount]*[eqs], iif([subDE]=(), [ amount]*[ser])))
The piece in blue ink is NOT working. I need the calc to grab everything not 15 and not 16, and perform the calc.
I have tried: Switch([subDE]="15",[amount]*[animal-mff]*12,[subDE]="16",[ amount]*[eqs],[subDE] not in (“15”,”16”),[ amount]*[ser])
With SWITCH, I get #error; with the IIF I get $0 amounts for anything that is not 15 or 16 (otherwise, it works perfectly).
The name on the side of number field, is not used nor identified in the database, it is used by accounting. I simply added it for reference.
15 horse 16 zebra 17 donkey 25 lion 26 tiger 35 bear 57 fish 80 dog 81 hyena 82 wolf 83 coyote