Switch and IIF function

R

rhoisy

I started with a IIF statement:
IIf([CONSUMP_MDDTL_HIST]![OS_PLATFORM_TYPE]=[Service Unit Conversion
table]![SERVICE LEVEL],[Service Unit Conversion table]![SERVICE UNITS])
AS Expr26,
I then changed to a switch function:
Switch([CONSUMP_MDDTL_HIST]![OS_PLATFORM_TYPE]=[Service Unit Conversion
table]![SERVICE LEVEL],[Service Unit Conversion table]![SERVICE UNITS])
AS Expr26,
As you can see this is an access call to an oracle database. There are two
tables and a call without this statement yealds 95 rows of data. The correct
amount of data. If I add either of these statments the row count doubles to
190. 95 rows of correct data with the correct calculation information and 95
row of the same data with out the correct data in Expression 26.
There are three matching data fields in SERVICE LEVEL and OS_PLATFORM_TYPE,
the the correct answer is always there, but there is always an extra row
without the expression 26 filled in.
I undestood this in the first statment as I fugured it was giving me an
answer for the false as the form for IIF( expression, true, False) but why is
Switch doing the same thinkg Switch(expression, true, expression, true,....)
Or if someone can think of another way of making this work, I'll try that.
 
Top