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

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.

Reply
BrandonL
Employee
Employee

Necesita ayuda: % de usuarios que cambian de Verdadero a Falso basado en 2 variables

Tengo una tabla en el formato debajo y quiero encontrar el % de cuántos jugadores cambian de valor verdadero a falso en camera_enabled basado en la marca de tiempo y session_id por player_idindividual.

Player_IDSession_IDCamera_enabledTimestamp
1aaaaVerdad1:00 PM
1bbbbVerdad3:00PM
1bbbbVerdad4:00 PM
1aaaaFalso2:00PM
2aaaaVerdad1:30 PM
2aaaaFalso2:00 PM
3CcccFalso1:00 PM
3CcccFalso2:00 PM

En resumen: 3 usuarios únicos... en 3 sesiones únicas... 1 jugador paticipado en 2 sesiones diferentes... 2 de los 4 emparejamientos han cambiado de estado de true a false por player_id por session_id

Resultado deseado: el 50% de los player_ids anteriores por sesión han cambiado camera_enabled estado de Verdadero a Falso

2 REPLIES 2
v-diye-msft
Community Support
Community Support

Hola @BrandonL

Por favor, compruebe los siguientes resultados:

  1. Agregué una nueva columna para diferenciar las 4 posibilidades.

Columna [Player_ID]&"_"&[Session_ID]

  1. Cree la medida para seleccionar los elementos modificados:

Medidas: var a - CALCULATE(DISTINCTCOUNT('Table'[Camera_enabled]),ALLEXCEPT('Table','Table'[Player_ID],'Table'[Session_ID],'Table'[Column]))

devolución

IF(a>1,1,BLANK())

  1. Salida final:

Medida 2 - var a ? CALCULATE(DISTINCTCOUNT('Table'[Column]),FILTER('Table',[Measure]<>BLANK()))

var b á DISTINCTCOUNT('Table'[Column])

devolución

DIVIDE(a,b)

Pbix unido para su facilidad.

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
v-diye-msft
Community Support
Community Support

Hola @BrandonL

Por favor, hágamelo saber si desea obtener los siguientes resultados:

Player1 y Player2 cambiaron el valor de true a false por sesión, por lo que la salida final debe ser 2/3-0.67.

Measure = var a = CALCULATE(DISTINCTCOUNT('Table'[Camera_enabled]),ALLEXCEPT('Table','Table'[Player_ID],'Table'[Session_ID]))
Return
IF(a>1,1,BLANK())
Measure 2 = var a = CALCULATE(DISTINCTCOUNT('Table'[Player_ID]),FILTER('Table',[Measure]<>BLANK()))
var b = DISTINCTCOUNT('Table'[Player_ID])
Return
DIVIDE(a,b)

Pbix adjunto.

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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