Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
LuisM
Contributor III
Contributor III

Function Aggr

hola buen dia

Estoy tratando de hacer una tabla con la función Aggr en donde obtengo el porcentaje de la venta total por vendedor.

Ejemplo:

Ejecutivo Ventas           Ingreso Bruto (Venta)                      % Venta

Luis                                           65444555451                                           

Fernando                                   4545454564                                     

¿Quisiera saber si mi expresión es correcta, me podría ayudar?

Aggr(Sum([Monto Mn Bruto SKU]), [Ejecutivo Ventas DetFac]) / Sum ([Monto Neto Mn SKU])

Anexo captura real de los datos:

LuisM_0-1653581448255.png

 

Gracias

 

Labels (2)
1 Solution

Accepted Solutions
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hola @LuisM 

If I understand the question correctly (with some help from Google Translate!) then you don't need to use aggr here at all. You can simply do the following:

Sum([Monto Mn Bruto SKU]) / Sum(TOTAL [Monto Mn Bruto SKU])

This will give you the total for the current row, divided by the total for all rows.

Where you would need to use an aggr is if you wanted to have a KPI showing the average amount per Seller. For this you need to get the total per seller and then divide it, without the use of a table. The syntax would be:

avg(aggr(Sum([Monto Mn Bruto SKU]),  [Ejecutivo Ventas DetFac]))

Hope that works and makes sense.

Cheers,

Steve

View solution in original post

1 Reply
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hola @LuisM 

If I understand the question correctly (with some help from Google Translate!) then you don't need to use aggr here at all. You can simply do the following:

Sum([Monto Mn Bruto SKU]) / Sum(TOTAL [Monto Mn Bruto SKU])

This will give you the total for the current row, divided by the total for all rows.

Where you would need to use an aggr is if you wanted to have a KPI showing the average amount per Seller. For this you need to get the total per seller and then divide it, without the use of a table. The syntax would be:

avg(aggr(Sum([Monto Mn Bruto SKU]),  [Ejecutivo Ventas DetFac]))

Hope that works and makes sense.

Cheers,

Steve