-1
IF {Field_A} = 0 THEN 0 ELSE (({Field_B} / {Field_A})*100)

I am trying to convert this formula to an SSRS expression. I have tried many different =IFF statements, but cannot seem to get it to run correctly.

Jeroen
  • 60,696
  • 40
  • 206
  • 339

2 Answers2

0

Almost a duplicate question: if you search here for #error ssrs iif you'll get plenty of results, such as Does the iif function compute both paths in SSRS or is it short-circuited?

Rewriting you statement is straightforward then:

=IIF(
   Fields!Field_A.Value = 0,
   0,
   Fields!Field_B.Value /
   IIF( Fields!Field_A.Value = 0, 1, Fields!Field_A.Value) * 100 )
Community
  • 1
  • 1
Jamie F
  • 23,189
  • 5
  • 61
  • 77
-1

If you have several formulas to convert, it is OK to do manually. However when you have quite a few complicated formulas to convert from Crystal to SSRS, you need a conversion tool to help. Please try Crystal Migration Services. Formulas like this canc be perfectly automatically converted. Free sample conversion is also available for you to evaluate.

http://www.crystalmigrater.com/Default.aspx