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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

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
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors
Top Kudoed Authors