3 Replies Latest reply: Apr 25, 2017 5:26 PM by Rob Wunderlich RSS

    Get the same total for the row.

    Alejandro Saa Garcia

      I was wondering me if is there any chance to get the total value to a row, like TOTAL function, I am looking for a way to get the total of a expression for all the dimenesions that below to the expression.

      I mean, according with the following image, I want the value 496 for the records of "Almacenaje Y Transporte" and the same for the others values.

      I hope someone can help me this topic,

       

      Best regards.

        • Re: Get the same total for the row.
          Rob Wunderlich

          You can use the TOTAL keyword with <>  qualifiers. For example:

           

          sum(Total<[Area Funcional]> somefield)

           

          So for example, to find the percentage of each row within [Area Funcional]:

           

          sum(somefield) / sum(Total<[Area Funcional]> somefield)


          -Rob

          http://masterssummit.com

          http://qlikviewcookbook.com

            • Re: Get the same total for the row.
              Alejandro Saa Garcia

              Hi, I should posted this before, my current expression:

               

              [Cantidad] / ((Count({1<ANO={$(vAno_anterior)}, NOM_MES={$(vNomMes_anterior)}, NOMBRE_MOTIVO_RETIRO=,MOTIVO_RETIRO=>} DISTINCT CEDULA_EMPLEADO) + Count({1<ANO={$(vAno)}, NOM_MES={$(vNomMes)}, NOMBRE_MOTIVO_RETIRO=,MOTIVO_RETIRO=>} DISTINCT CEDULA_EMPLEADO)) / 2)

               

              If I get your idea the expression become in sometime like this:

               

              [Cantidad] / ((Count(TOTAL<[Area Funcional]> {<ANO={$(vAno_anterior)}, NOM_MES={$(vNomMes_anterior)}, NOMBRE_MOTIVO_RETIRO=,MOTIVO_RETIRO=>} DISTINCT CEDULA_EMPLEADO) + Count(TOTAL<[Area Funcional]>{<ANO={$(vAno)}, NOM_MES={$(vNomMes)}, NOMBRE_MOTIVO_RETIRO=,MOTIVO_RETIRO=>} DISTINCT CEDULA_EMPLEADO)) / 2)

               

              The original expression used TOTAL without any qualifier and this got the overall total of the areas but not the total per area.