Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
mochabits
Helper II
Helper II

Medidas semiacumuladas

Tengo dos medidas: "Iniciar sesión" y "Cerrar sesión" en una tabla de matriz para mostrar el tiempo de inicio de sesión y el tiempo de cierre de sesión por empleado y por fecha.

login = CALCULATE(Min(table1[STARTTIME_CALC])
,filter(table1,table1[PRIMARY_STATUS]="AVAILABLE"))
 logout = CALCULATE(
        max(table1[STARTTIME]) 
,FILTER(table1,table1[PRIMARY_STATUS]="OFFLINE"))

mochabits_0-1603223177232.png

Sin embargo, no quiero que los valores de inicio de sesión y cierre de sesión se muestren en el nivel de emplyee de la tabla. Ambos tienen sentido sólo si son por empleado Y por fecha.

Mi pregunta es cómo modificar la medida de inicio de sesión y cierre de sesión para que no devuelvan un valor en la fila employee de la tabla matrix.

2 ACCEPTED SOLUTIONS
richbenmintz
Resident Rockstar
Resident Rockstar

Hola @mochabits,

Puede utilizar la función HASONEVALUE para controlar esto, vea el siguiente ejemplo de forumula

measure =
switch(true(),
hasonevalue('table'[user]) && not(hasonevalue('table'[date]), blank(),
hasonevalue('table'[user]) && hasonevalue('table'[date]), [measure],
, blank())

Espero que esto ayude,
Richard
¿He respondido a tu pregunta? ¡Marca mi puesto como una solución!
¿Mis respuestas ayudaron a llegar a una solución? Dale un kudos haciendo clic en Thumbs Up!



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


View solution in original post

sortega
Frequent Visitor

Saludos @mochabits , aquí deberías condicionar el valor que se muestra en los subtotales, la funcion HASONEVALUE o ISINCOPE te puedes servir bastante para esto, aquí te dejo un enlace para que veas cómo funcionan, HASONEVALUE: https://youtu.be/Q_l-6oYOdJ8, ISINSCOPE: https://youtu.be/OQUqdT7UDeQ

 

Espero esto haya solucionado tu situación, de ser así pues marca la respuesta como la solución por favor 

View solution in original post

2 REPLIES 2
sortega
Frequent Visitor

Saludos @mochabits , aquí deberías condicionar el valor que se muestra en los subtotales, la funcion HASONEVALUE o ISINCOPE te puedes servir bastante para esto, aquí te dejo un enlace para que veas cómo funcionan, HASONEVALUE: https://youtu.be/Q_l-6oYOdJ8, ISINSCOPE: https://youtu.be/OQUqdT7UDeQ

 

Espero esto haya solucionado tu situación, de ser así pues marca la respuesta como la solución por favor 

richbenmintz
Resident Rockstar
Resident Rockstar

Hola @mochabits,

Puede utilizar la función HASONEVALUE para controlar esto, vea el siguiente ejemplo de forumula

measure =
switch(true(),
hasonevalue('table'[user]) && not(hasonevalue('table'[date]), blank(),
hasonevalue('table'[user]) && hasonevalue('table'[date]), [measure],
, blank())

Espero que esto ayude,
Richard
¿He respondido a tu pregunta? ¡Marca mi puesto como una solución!
¿Mis respuestas ayudaron a llegar a una solución? Dale un kudos haciendo clic en Thumbs Up!



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors