Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hola
En Excel esto es muy fácil, pero me gustaría saber si esto es posible en power bi.
Tengo una visión general de las actuaciones con el inicio y el fin de la hora:
cada fila es 1 registro con inicio y fin: comenzar 13:48:37 y terminar 14:21:20
Es fácil calcular la diferencia por fila, por lo que el througputtime: por ejemplo, primera línea: 14:21:20 menos 13:48:37 es 00:32:43
Pero lo que no puedo resolver es: calcular el "tiempo perdido" hasta el siguiente registro:
Quiero decir: la diferencia entre la hora de inicio del registro 2 y la hora de finalización del registro 1:
14:23:20 menos 14:21:20 es 00:03:00
Y ese cálculo para cada registro hasta que no haya más datos.
Espero que alguien pueda ayudarme.
Muchas gracias de antemano
Ilse
Solved! Go to Solution.
Hola @IlseV ,
En primer lugar, cree una columna de índice;
A continuación, cree 2 columnas como se muestra a continuación:
Difference = 'Table'[End]-'Table'[Begin ]
lost time =
var _nexbegin=CALCULATE(MAX('Table'[Begin ]),FILTER('Table','Table'[Index]=EARLIER('Table'[Index])+1))
Return
IF(_nexbegin=BLANK(),BLANK(),_nexbegin-'Table'[End])
Y verás:
Para el archivo .pbix relacionado, pls ver adjunto.
Hola @IlseV ,
En primer lugar, cree una columna de índice;
A continuación, cree 2 columnas como se muestra a continuación:
Difference = 'Table'[End]-'Table'[Begin ]
lost time =
var _nexbegin=CALCULATE(MAX('Table'[Begin ]),FILTER('Table','Table'[Index]=EARLIER('Table'[Index])+1))
Return
IF(_nexbegin=BLANK(),BLANK(),_nexbegin-'Table'[End])
Y verás:
Para el archivo .pbix relacionado, pls ver adjunto.
@IlseV , Pruebe una nueva columna como
diff con la última fila [marea inicial en proceso] - maxx(table,[beginning tide in process] < earlier([beginning tide in process])),([End tide in process]))
Hi, thank you very much for your help!
I would never have found this.
One more question:
the first row can't calculate a difference because there is no row zero, so it returns the begin time 13:48:37
Is it possible to return this value (of the first row) blank?
Otherwise I get in trouble when I want to calculate sums or averages?
Many thanks,
Ilse
@IlseV - Prueba lo siguiente:
diff with last row =
VAR __Current = [begin tij in process]
VAR __Previous = MAXX(FILTER(Table,[begin tij in process] < EARLIER([begin tij in process])),[End tij in process])
RETURN
IF(ISBLANK(__Previous) || YEAR(__Previous)<1900 || __Previous<0,BLANK(),[Current]-__Previous)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |