two conditions

  • I can get this to work

    =iif(trim(Fields!PAYROLCD.Value) like "*S4BSC*", "*S4BSC*", nothing)

    but when i try to get two of them together to work i get error on both lines it should display S4BSC and S401K

    =iif(trim(Fields!PAYROLCD.Value) like "*S4BSC*", "*S4BSC*", nothing) or iif(trim(Fields!PAYROLCD.Value) like "*S401K*", "*S401K*", nothing)

  • I got it to work like this:

    =iif(trim(Fields!PAYROLCD.Value) like "*S4BSC*", "S4BSC", nothing) + iif(trim(Fields!PAYROLCD.Value) like "*S401K*", "S401K", nothing)

    I replaced the or with a plus sign

  • Ok, i got it to work with two conditions:

    =(iif(trim(Fields!PAYROLCD.Value) like "*S401BM*", "S401BM", nothing) + iif(trim(Fields!PAYROLCD.Value) like "*S401DM*", "S401DM", nothing

    but when i add the 3rd condition the 3rd one gives me a error

    =(iif(trim(Fields!PAYROLCD.Value) like "*S401BM*", "S401BM", nothing) + iif(trim(Fields!PAYROLCD.Value) like "*S401DM*", "S401DM", nothing) + iif(trim(Fields!PAYROLCD.Value) like "*S4BSC*", "S4BSC", nothing))

    I have about 5 of them that i want to display

  • check out the switch statement

  • That works. Thanks

  • .

  • I have two datasets

    lets just say dataset3 and dataset4

    When I run this:

    =Sum(Fields!S125.Value, "DataSet4")

    It gives me the sum of each employee in one total.

    This is what I expect to see

    employee s125

    A 10

    B 15

    but it shows this:

    employee s125

    A 25

    B 25

    and if i look at another employee it would add that one as well. When I take the sum off it doesn't work for the 2nd dataset

Viewing 7 posts - 31 through 36 (of 36 total)

You must be logged in to reply to this topic. Login to reply