What about something like this....
SELECT * , SUM( `Janunits` + `Febunits` + `Marunits` + `Aprunits` + `Mayunits` + `Jununits` + `Julunits` + `Augunits` + `Sepunits` + `Octunits` + `Novunits` + `Decunits` ) AS TotalUnits, (
ISNULL( (
(
`Janunits` + `Febunits` + `Marunits` + `Aprunits` + `Mayunits` + `Jununits` + `Julunits` + `Augunits` + `Sepunits` + `Octunits` + `Novunits` + `Decunits`
) - `Year1qty` ) / NULLIF( `Year1qty` , 0 )
)
)
With the above, I'm getting the query to pass, but I'm getting 1's for good data only and zeros for the records that had denominators as zero (which is fine), but the records that can be calculated I need the accurate calculation to show up, not just a one.
Any suggestions?