Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hola a todos
Tengo un problema con DAX se queda sin memoria.
El primero, he utilizado este DAX:
First date of Consecutive absence =
IF (
NOT AttendanceMaster[IsPresent],
VAR NextPrecense_ =
CALCULATE (
MIN ( AttendanceMaster[AttendanceDate] ),
ALLEXCEPT ( AttendanceMaster, AttendanceMaster[ChildID] ),
AttendanceMaster[AttendanceDate] > EARLIER ( AttendanceMaster[AttendanceDate] ),
AttendanceMaster[IsPresent] = TRUE ()
)
VAR LastAbsenceDay_ =
CALCULATE (
MAX ( AttendanceMaster[AttendanceDate] ),
ALLEXCEPT ( AttendanceMaster, AttendanceMaster[ChildID] ),
AttendanceMaster[AttendanceDate] < NextPrecense_
)
VAR NumConsecutiveAbsentDays_ =
CALCULATE (
COUNT ( AttendanceMaster[AttendanceDate] ),
ALLEXCEPT ( AttendanceMaster, AttendanceMaster[ChildID] ),
AttendanceMaster[AttendanceDate] >= EARLIER ( AttendanceMaster[AttendanceDate] ),
AttendanceMaster[AttendanceDate] < NextPrecense_
)
VAR IsStartofAbsence =
VAR PreviousDate_ =
CALCULATE (
MAX ( AttendanceMaster[AttendanceDate] ),
ALLEXCEPT ( AttendanceMaster, AttendanceMaster[ChildID] ),
AttendanceMaster[AttendanceDate] < EARLIER ( AttendanceMaster[AttendanceDate] )
)
RETURN
IF (
ISBLANK ( PreviousDate_ ),
TRUE (),
CALCULATE (
DISTINCT ( AttendanceMaster[IsPresent] ),
ALLEXCEPT ( AttendanceMaster, AttendanceMaster[ChildID] ),
AttendanceMaster[AttendanceDate] = PreviousDate_
)
)
RETURN
IF ( IsStartofAbsence, AttendanceMaster[AttendanceDate] )
)
El segundo, usé este DAX también y me quedo sin memoria:
Last date Consecutive of absence =
IF (
NOT AttendanceMaster[IsPresent],
VAR NextPrecense_ =
CALCULATE (
MIN ( AttendanceMaster[AttendanceDate] ),
ALLEXCEPT ( AttendanceMaster, AttendanceMaster[ChildID] ),
AttendanceMaster[AttendanceDate] > EARLIER ( AttendanceMaster[AttendanceDate] ),
AttendanceMaster[IsPresent] = TRUE ()
)
VAR LastAbsenceDay_ =
CALCULATE (
MAX ( AttendanceMaster[AttendanceDate] ),
ALLEXCEPT ( AttendanceMaster, AttendanceMaster[ChildID] ),
AttendanceMaster[AttendanceDate] < NextPrecense_
)
VAR NumConsecutiveAbsentDays_ =
CALCULATE (
COUNT ( AttendanceMaster[AttendanceDate] ),
ALLEXCEPT ( AttendanceMaster, AttendanceMaster[ChildID] ),
AttendanceMaster[AttendanceDate] >= EARLIER ( AttendanceMaster[AttendanceDate] ),
AttendanceMaster[AttendanceDate] < NextPrecense_
)
VAR IsStartofAbsence =
VAR PreviousDate_ =
CALCULATE (
MAX ( AttendanceMaster[AttendanceDate] ),
ALLEXCEPT ( AttendanceMaster, AttendanceMaster[ChildID] ),
AttendanceMaster[AttendanceDate] < EARLIER ( AttendanceMaster[AttendanceDate] )
)
RETURN
IF (
ISBLANK ( PreviousDate_ ),
TRUE (),
CALCULATE (
DISTINCT ( AttendanceMaster[IsPresent] ),
ALLEXCEPT ( AttendanceMaster, AttendanceMaster[ChildID] ),
AttendanceMaster[AttendanceDate] = PreviousDate_
)
)
RETURN
IF ( IsStartofAbsence, LastAbsenceDay_ )
)
No sé cómo arreglar esto. Tal vez hay cualquier DAX simple para medir el número total de niños que han ausente 3 o más días consecutivos. Por favor, ayúdame a hacer esto y gracias por tu ayuda.
Lo siento por la etiqueta, pero por favor ayúdame a solucionar este problema o ayúdame a encontrar otro DAX:
@Greg_Deckler @darlove@harshnathani @amitchandak @amitchandak @amitchandak @amitchandak @amitchandak@amitchandak @amitchandak @amitchandak @amitchandak @amitchandak @mahoneypat de @amitchandak @amitch... @camargos88 @amitchandak de @amitchandak de @amitchandak
Aquí, se adjuntan los datos en este enlace:
Lo mejor y gracias
LA