BrockLanders
Programmer
Hi, I have a query with a nested IIf statement that is not working correctly. The problem is happening in my final else statement. I'm getting values returned, but not the correct values. Below is my statement:
For a Chain that is not listed above, which are chains 2_data and 3_data, I'm getting the wrong numbers. So if Chain is equal to 2_data or 3_data the result should just be the value in [Current EVDY Net] field and not a calucation like the other chains.
Any ideas?
Code:
Sum(IIf([Chain]="1_data",([Current EVDY Net]*2),IIf([Chain]="4_data" Or "5_data" Or "6_data" Or "7_data",([Current EVDY Gross]*0.9),[Current EVDY Net]))) AS [EVDY Net]
For a Chain that is not listed above, which are chains 2_data and 3_data, I'm getting the wrong numbers. So if Chain is equal to 2_data or 3_data the result should just be the value in [Current EVDY Net] field and not a calucation like the other chains.
Any ideas?