Forum Discussion

sandipghosh2's avatar
sandipghosh2
New Member
1 year ago
Solved

IsNothing is not working for me

Hi, I am using below expression: It is not working for me. When I have value in M3_Gross_Sales_Contract_Entity.Value, it is showing % value.   I am also using below expression: IIF(SUM(Fields!M3...
  • hackcrr's avatar
    1 year ago

    Hi, sandipghosh2 

    You can use IIF statements or the IIf function in Paginated Reports to check for those conditions before performing the division. Here's an updated version of your expression:

    =IIF(
        SUM(Fields!M3_Gross_Sales_Contract_Entity.Value, "Main") = 0 OR IsNothing(Fields!M3_Gross_Sales_Contract_Entity.Value), 
        0,  -- Or you can return a default value such as "N/A"
        (SUM(Fields!M4_Gross_Sales_Contract_Entity.Value, "Main") - SUM(Fields!M3_Gross_Sales_Contract_Entity.Value, "Main")) / SUM(Fields!M3_Gross_Sales_Contract_Entity.Value, "Main")
    )