Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I need your help because I am having problems with the following situation.
I must generate a ranking by the [QTY Vta] of a certain product considering for
the ranking CAMPO1 and CAMPO2. This I generate on a simple table. There are 6
dimensions in the table and the problem is that the ranking is not generated
correctly. Here is the example that results:
CAMPO1 | CAMPO2 | CAMPO3 | CAMPO4 | CAMPO5 | CAMPO6 | QTY Vta | RANK |
ACCESORIOS | PROD1 | Prov 1 | MIF001X8 | T | T | 85.609 | 1 |
ACCESORIOS | PROD2 | Prov 1 | MIF001X8 | T | T | 30.352 | 2 |
ACCESORIOS | PROD3 | - | SB-1019-08 | F | F | 11.519 | 3 |
ACCESORIOS | PROD4 | Prov 2 | 179PB9D | T | T | 9.887 | 4 |
ACCESORIOS | PROD5 | Prov 3 | 1948628-6 | F | T | 9.718 | 5 |
ACCESORIOS | PROD6 | Prov 4 | T050105 | T | T | 8.293 | 6 |
ACCESORIOS | PROD7 | - | JD102-04 | F | F | 8.288 | 7 |
ACCESORIOS | PROD8 | - | SB-1442-01 | F | F | 8.199 | 9 |
ACCESORIOS | PROD9 | Prov 1 | SP008X1 | T | T | 8.149 | 10 |
ACCESORIOS | PROD10 | Prov 5 | 60619 | F | F | 7.638 | 11 |
ACCESORIOS | PROD11 | - | SB-1020-08 | F | F | 7.566 | 12 |
ACCESORIOS | PROD12 | - | HA-15503 | F | F | 7.478 | 8 |
ACCESORIOS | PROD13 | Prov 2 | 179MN11 | T | T | 6.802 | 13 |
ACCESORIOS | PROD14 | Prov 6 | 1518372-6 | F | F | 6.711 | 14 |
ACCESORIOS | PROD15 | Prov 1 | MIF103 | T | T | 6.376 | 15 |
ACCESORIOS | PROD16 | Prov 2 | 17SF651 | T | T | 5.823 | 16 |
ACCESORIOS | PROD17 | Prov 5 | 60621 | F | F | 5.686 | 17 |
ACCESORIOS | PROD18 | Prov 2 | 179PB73 | T | T | 5.566 | 18 |
ACCESORIOS | PROD19 | Prov 5 | 60620 | F | F | 5.518 | 19 |
ACCESORIOS | PROD20 | Prov 3 | XH-R2503-2PCS | T | T | 5.478 | 20 |
ACCESORIOS | PROD21 | Prov 2 | 17SF651 | T | T | 5.416 | 21 |
ACCESORIOS | PROD22 | - | SB-1453-01 | F | F | 5.370 | 22 |
ACCESORIOS | PROD23 | Prov 1 | MIF005X3 | T | T | 4.989 | 23 |
ACCESORIOS | PROD24 | Prov 3 | WJ-150A-1 | F | T | 4.974 | 24 |
ACCESORIOS | PROD25 | Prov 4 | T050105 | T | T | 4.931 | 25 |
ACCESORIOS | PROD26 | Prov 3 | WJ-10 | T | T | 4.696 | 26 |
ACCESORIOS | PROD27 | Prov 2 | 199BKBB | F | T | 4.548 | 27 |
ACCESORIOS | PROD28 | - | RCP-160 | F | F | 4.347 | 28 |
ACCESORIOS | PROD12 | - | - | F | F | 735 | 8 |
ACCESORIOS | PROD5 | Prov 3 | WJ-10 | T | T | 17 | 5 |
The above I calculate it through a calculated dimension:
Aggr( Rank( Sum([QTY Vta])), CAMPO1, CAMPO2)
I think the problem may occur because a PROD (CAMPO2) can be repeated with other
combinations of fields.
Thanks and excuse for the language, all thanks to google translator.
Hola, como va??
Si, estas usando rank con campos que no son clave, ahora vos porque quisieras tener un ranking ??? no lo podrias ordenar desde el grafico por cantidad??
Otra cosa, cada vez que uses un expresion aggr tene en cuenta todos los campos que tiene el grafico, si tenes mas dimensiones pero vos solo querias agrupar por 2 campos, te lo va a hacer por registro en el grafico, ponle que tenes 2 registros con los 2 campos iguales por ejemplo lo que te esta pasando con
ACCESORIOS PROD12
Mmmmm hace de cuenta de que no te dije nada, te esta dando bien, fíjate que si sumas las cantidades
7478
+
735
=
8213
Despues agregas un detalle con el resto de los campos, para que el usuario pueda analizar.
Ese numero esta entre la cantidad que tiene el puesto 7 y 9, asi que esta correcto pensar que hay 2 registros con el mismo ranking debido a que campo 1 y campo 2 son iguales, asi que sumo sus cantidades y los coloco un numero en el rank, ahora no queda muy claro, deberias armar un grafico que sea solo con la cantidad de ventas, rank y campo 1 y campo 2.
Saludos!!!