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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

DAX se quede sin memoria - Necesita ayuda en DAX

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

@vivran22 @bboobe @LAndes

Aquí, se adjuntan los datos en este enlace:

Mis datos

Lo mejor y gracias

LA

0 REPLIES 0

Helpful resources

Announcements
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.