4 Replies Latest reply: Oct 5, 2016 1:01 PM by Cristhian López RSS

    NEST NEED SEVERAL EXPRESSIONS

    Cristhian López

      Hello,

       

      Perform a table, listing various genres, each has different conditions to show included, what I try to do is use the IF, but when I try to enter the second I make mistake, someone knows how to solve this, accompanying the expressions. As I close the condition? Deputy table


      if(GENERO='Televisa',

      SUM({<CANAL={'TNCENA','TNCE2H','TNCNA5','TNCE1H'},

      PRODUCTO=-{'integración'},

      CLIENTE=-{'NACES','DERAS','VYPFE','CRECE','MARENO','MUFAR','IMEXLA'},

      FRANJA={'1M','2T','3P'}>}

      IMPORTE_NETO)/1000)

      ,

      if(GENERO='Deportivos',

      SUM({<CANAL={'TNTDMX','TNTDUN'},

      PRODUCTO=-{'integración'},

      CLIENTE=-{'NACES','DERAS','VYPFE','CRECE','MARENO','MUFAR','IMEXLA'},

      FRANJA={'2T'}>}IMPORTE_NETO)/1000)

        • Re: NEST NEED SEVERAL EXPRESSIONS
          Sunny Talwar

          May be you need to add the second closing parenthesis at the end and remove it at the end of first if statement:

           

          If(GENERO='Televisa',

          SUM({<CANAL={'TNCENA','TNCE2H','TNCNA5','TNCE1H'},

          PRODUCTO=-{'integración'},

          CLIENTE=-{'NACES','DERAS','VYPFE','CRECE','MARENO','MUFAR','IMEXLA'},

          FRANJA={'1M','2T','3P'}>}

          IMPORTE_NETO)/1000-> Remove this one

          ,

          If(GENERO='Deportivos',

          SUM({<CANAL={'TNTDMX','TNTDUN'},

          PRODUCTO=-{'integración'},

          CLIENTE=-{'NACES','DERAS','VYPFE','CRECE','MARENO','MUFAR','IMEXLA'},

          FRANJA={'2T'}>}IMPORTE_NETO)/1000))

           

          So like this,

           

          If(GENERO='Televisa',

          SUM({<CANAL={'TNCENA','TNCE2H','TNCNA5','TNCE1H'},

          PRODUCTO=-{'integración'},

          CLIENTE=-{'NACES','DERAS','VYPFE','CRECE','MARENO','MUFAR','IMEXLA'},

          FRANJA={'1M','2T','3P'}>}

          IMPORTE_NETO)/1000

          ,

          If(GENERO='Deportivos',

          SUM({<CANAL={'TNTDMX','TNTDUN'},

          PRODUCTO=-{'integración'},

          CLIENTE=-{'NACES','DERAS','VYPFE','CRECE','MARENO','MUFAR','IMEXLA'},

          FRANJA={'2T'}>}IMPORTE_NETO)/1000))

            • Re: NEST NEED SEVERAL EXPRESSIONS
              Cristhian López

              Ey Sunny

               

              Thank you very much, I quite work out, so clean error, apply and remain, in theory perform the same operation as I have to add more expressions, and now I back out the error, I am doing wrong?

               

              This is the expression that I have to do

               

              if(GENERO='Televisa',SUM({<CANAL={'TNCENA','TNCE2H','TNCNA5','TNCE1H'},PRODUCTO=-{'integración'},CLIENTE=-{'NACES','DERAS','VYPFE','CRECE','MARENO','MUFAR','IMEXLA'},FRANJA={'1M','2T','3P'}>}IMPORTE_NETO)/1000,


              if(GENERO='Deportivos',SUM({<CANAL={'TNTDMX','TNTDUN'},PRODUCTO=-{'integración'},CLIENTE=-{'NACES','DERAS','VYPFE','CRECE','MARENO','MUFAR','IMEXLA'},FRANJA={'2T'}>}IMPORTE_NETO)/1000))

              ,

              if(GENERO='Novelas',SUM({<CANAL={'TNTLLA'},PRODUCTO=-{'integración'},CLIENTE=-{'NACES','DERAS','VYPFE','CRECE','MARENO','MUFAR','IMEXLA'},FRANJA={'3P'}>}IMPORTE_NETO)/1000)

              ,

              if(GENERO='Peliculas'(SUM({<CANAL={'TNGOLD','TNGLED'},PRODUCTO=-{'integración'},CLIENTE=-{'NACES','DERAS','VYPFE','CRECE','MARENO','MUFAR','IMEXLA'},FRANJA={'3P'}>}IMPORTE_NETO)/1000)

              ,

              if(GENERO='Música y Audio',SUM({<CANAL={'TNBAND','TNHITN'},PRODUCTO=-{'integración'},CLIENTE=-{'NACES','DERAS','VYPFE','CRECE','MARENO','MUFAR','IMEXLA'},FRANJA={'3P'}>}IMPORTE_NETO)/1000)

                • Re: NEST NEED SEVERAL EXPRESSIONS
                  Sunny Talwar

                  Try this:

                   

                  If(GENERO='Televisa',SUM({<CANAL={'TNCENA','TNCE2H','TNCNA5','TNCE1H'},PRODUCTO=-{'integración'},CLIENTE=-{'NACES','DERAS','VYPFE','CRECE','MARENO','MUFAR','IMEXLA'},FRANJA={'1M','2T','3P'}>}IMPORTE_NETO)/1000

                  ,

                  If(GENERO='Deportivos',SUM({<CANAL={'TNTDMX','TNTDUN'},PRODUCTO=-{'integración'},CLIENTE=-{'NACES','DERAS','VYPFE','CRECE','MARENO','MUFAR','IMEXLA'},FRANJA={'2T'}>}IMPORTE_NETO)/1000

                  ,

                  If(GENERO='Novelas',SUM({<CANAL={'TNTLLA'},PRODUCTO=-{'integración'},CLIENTE=-{'NACES','DERAS','VYPFE','CRECE','MARENO','MUFAR','IMEXLA'},FRANJA={'3P'}>}IMPORTE_NETO)/1000

                  ,

                  If(GENERO='Peliculas'(SUM({<CANAL={'TNGOLD','TNGLED'},PRODUCTO=-{'integración'},CLIENTE=-{'NACES','DERAS','VYPFE','CRECE','MARENO','MUFAR','IMEXLA'},FRANJA={'3P'}>}IMPORTE_NETO)/1000

                  ,

                  If(GENERO='Música y Audio',SUM({<CANAL={'TNBAND','TNHITN'},PRODUCTO=-{'integración'},CLIENTE=-{'NACES','DERAS','VYPFE','CRECE','MARENO','MUFAR','IMEXLA'},FRANJA={'3P'}>}IMPORTE_NETO)/1000)))))

                   

                  Instead of ending each of the if statement, end it at the end.