Tabular - ¿Agregar promedio mensual?Estoy tratando de agregar el promedio mensual a mi tabla tabulada...¿Qué estoy haciendo mal?No está promediando el precio por mes...
Para fines de visualización, estoy usando los datos de muestra: precios al consumidor.
Guion:
Tabulate(
Show Chart( 1 ),
Show Shading( 1 ),
Show Control Panel( 0 ),
Set Format( Uniform Format( 10, 2 ) ),
Add Table(
Column Table( Grouping Columns( :Month ), Analysis Columns( :Price ) ),
Column Table( Statistics( Mean ), Analysis Columns( :Price ) ),
Row Table( Grouping Columns( :Series ) )
)
);
Resultado:

Re: Tabular - ¿Agregar promedio mensual?¡Gracias Stan!Trabajado como un encanto. 
Re: Tabular - ¿Agregar promedio mensual?Hola @MariaK ,
Una forma de hacer lo que desea es crear una tabla de resumen y luego ejecutar tabular en la tabla de resumen.
dt = Open( "$SAMPLE_DATA\Consumer Prices.jmp" );
dt << Summary(
Group( :Series, :Month ),
Sum( :Price ),
Freq( "None" ),
Weight( "None" )
);
dt2 = Current Data Table();
dt2:Name("Sum(Price)")<<SET name=""></SET>
Monthly AveragesMonthly AveragesPromedios Mensuales salud,
Stan
Re: Tabular - ¿Agregar promedio mensual?jeff,
Quiero mostrar la suma por mes y el promedio del año por mes.
En excel tomaría el promedio de todos los meses.
| Serie | Suma(Precio, Ene) | Suma(Precio, febrero) | Suma(Precio, Mar) | Suma(Precio, abril) | Suma(Precio, mayo) | Suma(Precio, junio) | Suma(Precio, julio) | Suma(Precio, Agosto) | Suma(Precio, Sep) | Suma (Precio, octubre) | Suma(Precio, noviembre) | Suma(Precio, Diciembre) | Promedio mensual |
| manzanas | 20.29 | 21.45 | 21.48 | 21.53 | 22.02 | 22.75 | 23.47 | 23.14 | 22.76 | 20.50 | 19.95 | 19.95 | 21.61 |
| plátanos | 11.27 | 11.92 | 12.58 | 12.64 | 12.52 | 12.47 | 12.34 | 11.49 | 11.27 | 11.09 | 11.04 | 11.04 | 11.81 |
| Pan | 20.49 | 20.49 | 20.54 | 20.65 | 20.67 | 20.70 | 20.81 | 19.79 | 19.78 | 19.77 | 19.93 | 19.90 | 20.29 |
| Pollo | 24.59 | 24.62 | 24.76 | 24.68 | 24.48 | 24.79 | 25.15 | 24.14 | 24.28 | 23.99 | 24.01 | 23.83 | 24.44 |
| Café | 81.68 | 82.30 | 82.35 | 82.85 | 82.93 | 82.78 | 83.69 | 81.28 | 80.31 | 79.48 | 78.12 | 77.67 | 81.29 |
| Huevos | 12.84 | 12.66 | 12.33 | 12.32 | 11.39 | 11.40 | 11.37 | 12.05 | 11.96 | 11.90 | 12.31 | 13.20 | 12.14 |
| Electricidad | 534.68 | 534.80 | 536.46 | 536.72 | 539.12 | 551.89 | 555.66 | 495.68 | 495.26 | 487.80 | 484.41 | 483.88 | 519.70 |
| Petróleo combustible #2 | 14.95 | 15.68 | 15.55 | 15.35 | 15.11 | 14.86 | 14.82 | 12.38 | 13.11 | 13.52 | 13.56 | 13.59 | 14.37 |
| gasolina, todo | 16.23 | 16.53 | 17.23 | 18.31 | 18.80 | 18.70 | 18.62 | 15.76 | 16.48 | 16.15 | 15.47 | 14.87 | 16.93 |
| gasolina sin plomo | 15.61 | 15.94 | 16.64 | 17.72 | 18.18 | 18.08 | 18.01 | 15.19 | 15.91 | 15.57 | 14.91 | 14.30 | 16.34 |
| Carne picada | 52.28 | 52.43 | 52.41 | 52.25 | 52.17 | 52.11 | 51.62 | 49.54 | 49.55 | 49.77 | 50.07 | 50.35 | 51.21 |
| Lechuga | 19.04 | 16.30 | 17.55 | 18.43 | 18.13 | 16.56 | 16.11 | 16.02 | 17.22 | 17.14 | 17.95 | 18.56 | 17.42 |
| Leche | 22.93 | 22.90 | 22.83 | 22.78 | 22.83 | 22.90 | 22.87 | 22.93 | 23.01 | 23.20 | 23.36 | 23.45 | 23.00 |
| Gas natural | 445.93 | 436.58 | 432.23 | 429.50 | 432.26 | 431.47 | 433.34 | 377.69 | 384.47 | 393.11 | 404.12 | 405.20 | 417.16 |
| Zumo de naranja | 45.48 | 46.15 | 45.92 | 46.53 | 46.22 | 46.48 | 46.57 | 44.62 | 44.24 | 44.31 | 44.05 | 43.80 | 45.36 |
| naranjas | 15.19 | 15.31 | 15.77 | 16.36 | 15.65 | 6.60 | 1.27 | | 2.51 | 3.69 | 16.45 | 15.46 | 11.30 |
| Tomates | 32.06 | 31.61 | 32.56 | 32.50 | 30.48 | 29.48 | 27.92 | 24.75 | 24.66 | 26.76 | 29.51 | 31.86 | 29.51 |
Re: Tabular - ¿Agregar promedio mensual?Estás agregando Mean como un Tabla de columnas en su script con la declaración:
Column Table( Statistics( Mean ), Analysis Columns( :Price ) )
En su lugar, desea agregarlo como una columna de análisis en la tabla de columnas existente.
dt = Open( "$SAMPLE_DATA\Consumer Prices.jmp" );
dt << Tabulate(
Show Chart( 1 ),
Add Table(
Column Table(
Grouping Columns( :Month ),
Analysis Columns( :Price ),
Statistics( Sum, Mean )
),
Row Table( Grouping Columns( :Series ) )
)
);
Para obtener esta sintaxis, construí la tabla interactiva y luego le pedí a JMP el script del punto de acceso del triángulo rojo.
