using a field inside query for total - error (1 Viewer)

felicia.scott@

New member
Local time
Yesterday, 22:31
Joined
Jul 20, 2018
Messages
7
Hi,

I'm using a field inside of my query to give me a calculation then taking that calculation to get a separate #. When I run, it asks for the name of the calculated field. Is there something I should do differently or should I have the calculation happen in a separate query?

Example:
Field 1: Exceptional
Field 2: iif (Field 1]="Exceptional",3, "N/A")
Field 3: iif [Field 2]="3",3*3,0)

thanks for the help.

Felicia
 

plog

Banishment Pending
Local time
Yesterday, 22:31
Joined
May 11, 2011
Messages
11,638
You can either do Field2 in one query, then build another query to do Field3. Or just algebraic substitution for Field 3:

a = b+c
d = a*a
d = (b+c) * (b+c)
 

isladogs

MVP / VIP
Local time
Today, 04:31
Joined
Jan 14, 2017
Messages
18,209
Using a separate query is reliable
Alternately you can try merging your IIF statements into one calculation
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 11:31
Joined
May 7, 2009
Messages
19,231
you should use the field Exceptional for all calculated fields:

Field 1: Exceptional
Field 2: iif ([Exceptional]="Exceptional",3, "N/A")
Field 3: iif [[Exceptional]="Exceptional",3*3,0)
 

Users who are viewing this thread

Top Bottom