11 Replies Latest reply: Mar 17, 2016 3:57 AM by A v RSS

    Complex Nesteed IFs - garbage after expression

    A v

      Hello,

       

       

       

      I need to have this 3 satements to define the colour of my bares, but I'm getting the fllowing error "garbage after expression"

       

      My code is the following:

       

      IF(A = 0,(IF(FIELD=1, RGB(34, 156, 228),IF(FIELD=2, RGB(0, 0, 0), IF(FIELD=3, RGB(34, 156, 228),IF(FIELD=4, RGB(0, 0, 0),IF(FIELD=5, RGB(34, 156, 228),IF(FIELD=6, RGB(0, 0, 0)))))))))

       

       

      //

      =IF(A= 1,

        only({<FIELD={1}>} RGB(120,120,120)),

        IF(A=2,

        only({<FIELD={2)>} RGB(120,120,120)),

        IF(A= 3,

        only({<FIELD={3} RGB(120,120,120))));

       

        =IF(A2=4,

        only({<FIELD={4}>} RGB(120,120,120)),

        IF(A2=5,

        only({<FIELD={"<=5"}>} RGB(120,120,120)),

        IF(A2=6,

            only({<FIELD={"<=6)"}>} RGB(120,120,120))

        )));

       

       

       

      Can anybody help me?