Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get the same total for the row.

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.

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

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

View solution in original post

3 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Not applicable
Author

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.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I believe you have it correct except the TOTAL should come after the set expression:

[Cantidad] / ((Count( {<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=>} TOTAL<[Area Funcional]> DISTINCT CEDULA_EMPLEADO)) / 2)


-Rob

http://masterssummit.com

http://qlikviewcookbook.com