C
Calvin Willman
I'm trying to create a calculated field, which returns the margin.
The part of the Select statement looks like this...
Sum(IIf ([TOTAL_PRICE]=0,0,
IIf([TOTAL_PROFIT]=0,0,([TOTAL_PROFIT]/[TOTAL_PRICE])*100) )) AS MARGIN
But I'm getting a Division By Zero error message still.... I thought this
should check for Zero's and just return Zero if one is found.
Can someone have a look at this please, as I've never used the IIF statement
in Access SQL Statements before.
The part of the Select statement looks like this...
Sum(IIf ([TOTAL_PRICE]=0,0,
IIf([TOTAL_PROFIT]=0,0,([TOTAL_PROFIT]/[TOTAL_PRICE])*100) )) AS MARGIN
But I'm getting a Division By Zero error message still.... I thought this
should check for Zero's and just return Zero if one is found.
Can someone have a look at this please, as I've never used the IIF statement
in Access SQL Statements before.