Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
mviglas@illesfoods.com
Starting Member
1 Post |
Posted - 2009-02-23 : 12:59:34
|
I have 2 % Variance Calculations; one for Runtime and one for Pounds.On the Runtime % Variance, I get #Error and on Pounds % Variance I get a "-Infinity" I know that it is zeroes causing my problems.Please help fix my IIF statements below.=IIF(SUM(Fields!ACTUAL_RUNTIME.Value)-SUM(Fields!STD_RUNTIME.Value)=0,0,(SUM(Fields!ACTUAL_RUNTIME.Value)-SUM(Fields!STD_RUNTIME.Value))/SUM(Fields!ACTUAL_RUNTIME.Value)*100)AND=IIF(SUM(Fields!ACTUAL_LBS.Value)-SUM(Fields!STD_LBS.Value)=0,0,(SUM(Fields!ACTUAL_LBS.Value)-SUM(Fields!STD_LBS.Value))/SUM(Fields!ACTUAL_LBS.Value)*100) |
|
Cody
Starting Member
24 Posts |
Posted - 2009-02-23 : 18:17:20
|
Try=IIf(Sum(Fields!ACTUAL_RUNTIME.Value) = 0, 0, ((Sum(Fields!ACTUAL_RUNTIME.Value) - SUM(Fields!STD_RUNTIME.Value)) / Sum(Fields!ACTUAL_RUNTIME.Value)) * 100)=IIf(Sum(fields!ACTUAL_LBS.Value) = 0, 0 ((Sum(Fields!ACTUAL_LBS.Value) - Sum(Fields!STD_LBS.Value)) / Sum(Fields!ACTUAL_LBS.Value) * 100) |
 |
|
|
|
|