Table two Column

  • There is the solution?

  • amadeu_j (5/7/2014)


    There is the solution?

    Not sure what you mean.

    If your table contained

    col1 col2 col3

    test1 10 OK

    test1 6 DEL

    test2 5 OK

    what result do you want?

    Far away is close at hand in the images of elsewhere.
    Anon.

  • col1 col2 col3

    test1 10 OK

    test1 60 DEL

    test2 5 OK

    obtained result

    col1 col2 col3

    test1 10 OK

    test1 2 DEL

    test2 5 OK

    result we wanted to get

    col1 col2 col3

    test1 10 OK

    test1 -66 DEL

    test2 5 OK

  • Sorry that does not make sense to me

    How did you get from

    col1 col2 col3

    test1 10 OK

    test1 60 DEL

    test2 5 OK

    to this

    col1 col2 col3

    test1 10 OK

    test1 2 DEL

    test2 5 OK

    and finally to this

    col1 col2 col3

    test1 10 OK

    test1 -66 DEL

    test2 5 OK

    Far away is close at hand in the images of elsewhere.
    Anon.

  • Let's start from the beginning, to see if I explain myself better.

    I initially wanted everything that was put DEL 0, now I want to put col2

    only with your expression the result is not correct.

    example

    the value of col2 = 66

    using its expression should also give col2 = -66

    but the result is that average is 2 Adar, when I wanted the -66, ie the negative value of col2 whenever DEL

  • Using

    =IIF(Fields!col3.Value = "DEL",-CDec(Fields!col2.Value),CDec(Fields!col2.Value))

    Will change

    col1 col2 col3

    test1 10 OK

    test1 66 DEL

    test2 5 OK

    to

    col1 col2 col3

    test1 10 OK

    test1 -66 DEL

    test2 5 OK

    You introduced SUM Why?

    Far away is close at hand in the images of elsewhere.
    Anon.

  • well where I get this error, but do not know how to solve.

    I have the following expression

    =(IIF(Fields!Estado.Value = "IVA", -CDbl(Fields!TotalFinal.Value),CDbl(Fields!TotalFinal.Value))) and (IIF(Fields!Estado.Value = "DEL", CDbl(0),CDbl(Fields!TotalFinal.Value)))

    to join the two with "and" do I get the wrong result. Is there another way to put this rule?

  • If you mean

    If IVA then negative TotalFinal

    If DEL then Zero

    Otherwise TotalFinal

    then use Switch like this

    =Switch(Fields!Estado.Value = "IVA", -CDbl(Fields!TotalFinal.Value), Fields!Estado.Value = "DEL", CDbl(0), True, CDbl(Fields!TotalFinal.Value))

    Far away is close at hand in the images of elsewhere.
    Anon.

  • Many thanks David for help was this really the expected result

  • You're welcome 🙂

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 10 posts - 16 through 24 (of 24 total)

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