Anónimo
Quiero mostrar la variación del costo unitario de un mes al siguiente, pero si hay un mes en blanco, quiero que se salte ese mes y pase al siguiente… Por ejemplo: el segundo elemento de la lista: quiero que se muestre la variación de febrero a marzo, de marzo a abril, de abril a julio, de julio a septiembre, etc. ¿Puede alguien ayudarme, por favor?
v-jiascu-msft
En respuesta a Anónimo
Hola @Anonimo,
No sé cómo calcular el costo. Pero puedes cambiarlo tú mismo. Descargue la demostración en el archivo adjunto.
Measure 3 = VAR lastMonth = CALCULATE ( MONTH ( MAX ( 'Table1'[Period] ) ), FILTER ( ALL ( 'Calendar'[Date] ), 'Calendar'[Date] < MIN ( 'Calendar'[Date] ) ) ) VAR costLastMonth = CALCULATE ( DIVIDE ( SUMX ( 'Table1', 'Table1'[Burden Actual Cost] + 'Table1'[Labor Actual Cost] + 'Table1'[Labor Var Inventory Value] + Table1[Mtl Actual Cost] ), SUM ( Table1[Qty] ) ), FILTER ( ALL ( 'Calendar'[Date] ), MONTH ( 'Calendar'[Date] ) = lastMonth ) ) VAR costThisMonth = DIVIDE ( SUMX ( 'Table1', 'Table1'[Burden Actual Cost] + 'Table1'[Labor Actual Cost] + 'Table1'[Labor Var Inventory Value] + Table1[Mtl Actual Cost] ), SUM ( Table1[Qty] ) ) RETURN IF ( ISBLANK ( costThisMonth ), BLANK (), costThisMonth - costLastMonth )
Atentamente,
Valle
v-jiascu-msft
Hola @Anonimo,
¿Puede compartir una muestra de los datos originales, por favor?
Atentamente,
Valle
Anónimo
En respuesta a v-jiascu-msft
Aquí hay un ejemplo de los datos originales.
Período | Parte | Cantidad | Carga Costo real | Costo real de mano de obra | Valor de inventario Var mano de obra | Costo real de Mtl |
31/03/17 | 10246099 | 48 | 1,241.10 | 74.18 | (67.68) | 2,376.04 |
28/02/17 | 10246099 | 60 | 1,241.10 | 74.18 | (84.60) | 2.616,23 |
28/02/17 | 10246099 | 96 | 4,451.41 | 266.07 | (135.36) | 4,755.90 |
30/04/17 | 10246099 | 240 | 6.224,41 | 372.04 | (338.40) | 11,422.99 |
31/7/17 | 10246099 | 204 | 4,833.00 | 264.94 | (320.28) | 9,348.57 |
30/09/17 | 10246099 | 84 | 2,404.90 | 150.63 | (131.88) | 3,975.00 |
31/10/17 | 10246099 | 204 | 5.090,76 | 279.07 | (320.28) | 9.371,75 |
30/11/17 | 10246099 | 132 | 4,124.16 | 226.09 | (207.24) | 6.529,27 |
v-jiascu-msft
En respuesta a Anónimo
Hola @Anonimo,
No sé cómo calcular el costo. Pero puedes cambiarlo tú mismo. Descargue la demostración en el archivo adjunto.
Measure 3 = VAR lastMonth = CALCULATE ( MONTH ( MAX ( 'Table1'[Period] ) ), FILTER ( ALL ( 'Calendar'[Date] ), 'Calendar'[Date] < MIN ( 'Calendar'[Date] ) ) ) VAR costLastMonth = CALCULATE ( DIVIDE ( SUMX ( 'Table1', 'Table1'[Burden Actual Cost] + 'Table1'[Labor Actual Cost] + 'Table1'[Labor Var Inventory Value] + Table1[Mtl Actual Cost] ), SUM ( Table1[Qty] ) ), FILTER ( ALL ( 'Calendar'[Date] ), MONTH ( 'Calendar'[Date] ) = lastMonth ) ) VAR costThisMonth = DIVIDE ( SUMX ( 'Table1', 'Table1'[Burden Actual Cost] + 'Table1'[Labor Actual Cost] + 'Table1'[Labor Var Inventory Value] + Table1[Mtl Actual Cost] ), SUM ( Table1[Qty] ) ) RETURN IF ( ISBLANK ( costThisMonth ), BLANK (), costThisMonth - costLastMonth )
Atentamente,
Valle