locked
RDLC expression needs to be modified for betterment RRS feed

  • Question

  • User1182587605 posted

    I am working on a percentage column to calculate the values from two other columns. but I have a #Error at some places and some others get 235.5 % both are wrong in my case. Others are fine. Please look at my expression and help me modify the expression accordingly.

    My expression is

    =iif(Fields!Actual_ship_qty.Value=0 or Fields!plan_to_ship.Value=0,0,CDEC(((Fields!Actual_ship_qty.Value-Fields!plan_to_ship.Value)/Fields!plan_to_ship.Value)+1)*100)

    Please help me how to work on this and solve it.

    Thanks,

    Deepak

    Thursday, June 15, 2017 1:53 PM

All replies

  • User991499041 posted

    Hi Deepak,

    I am working on a percentage column to calculate the values from two other columns. but I have a #Error at some places and some others get 235.5 % both are wrong in my case. Others are fine. Please look at my expression and help me modify the expression accordingly.

    My expression is

    =iif(Fields!Actual_ship_qty.Value=0 or Fields!plan_to_ship.Value=0,0,CDEC(((Fields!Actual_ship_qty.Value-Fields!plan_to_ship.Value)/Fields!plan_to_ship.Value)+1)*100)

    Please help me how to work on this and solve it.

    Iif is a function and so all arguments are evaluated before the function is called. So there is no use in using Iif to prevent error.

    I suppose you need a User defined function (Writing Custom functions in SSRS)

    Regards,

    zxj

    Friday, June 16, 2017 6:43 AM