Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Tengo una tabla con los campos: Nombre Fecha Tipo Hora Indice y Tiempos
La columna indice tiene esta formula: =CONTAR.SI($A$2:A2,A2)
La columna tiempos tiene esta formula: =SI(A3=A2,D3-D2,"")
Esas 2 columnas son adicionales a mi tabla
Lo que yo quiero es cargar mi tabla original en power pivot y desde ahi agregar las 2 columnas y con formulas dax
sacar el indice y sacar la diferencia entre tiempos.
Para posteriormente poder verificar cuanto tiempo estuvo adentro un usuario y cuanto tiempo estuvo afuera.
Necesito saber por cada dia, cuanto tiempo estuvo el usuario adentro y cuanto afuera, para eso necesito la diferencia de tiempos.
En excel se logra facil ya que se manipula la formula, pero no he podido hacerlo en dax.
Alguien me podria ayudar por favor?
Puede crear dos columnas calculadas de la siguiente manera.
Index = COUNTROWS(FILTER('Table',[Hora]<=EARLIER('Table'[Hora])&&[Nombre]=EARLIER('Table'[Nombre])))
Diff = var _pre=CALCULATE(MAX('Table'[Hora]),FILTER('Table',[Index] < ode="">

Puede descargar el archivo adjunto para obtener más detalles.
Saludos
Esteban Tao
Si esta publicación ayuda, considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.