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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Syndicate_Admin
Administrator
Administrator

Cree una medida que ignore una segmentación de páginas

Hola

Tengo una medida creada que está funcionando. Sin embargo, necesito actualizarlo para que ignore una de las segmentaciones de datos que tengo en la página.

Aquí está mi medida creada:

YoY admite la admisión de la empresa
( DIVIDE (
CALCULAR (
DISTINCTCOUNT ( ClaimData[ClaimID] ),
FILTER ( ClaimData, ClaimData[FacilityCat] - "Facilidad"),
ClaimData, ClaimData[FlagAdmission] = "Y",
ClaimData, ClaimData[Producto] - "Médico",
PlanYear[PlanYearStatus] á "Actual" ),
CALCULAR (
SUM ( MemberMonths[TotalMembers] ), PlanYear[PlanYearStatus] á "Current" )
)
* 1000 * CALCULATE ( DISTINCTCOUNT ( MemberMonths[MonthStart] ), FILTER ( PlanYear, PlanYear[PlanYearStatus] ? "Current" )
) )
-
( DIVIDE (
CALCULAR (
DISTINCTCOUNT ( ClaimData[ClaimID] ),
FILTER ( ClaimData, ClaimData[FacilityCat] - "Facilidad"),
ClaimData, ClaimData[FlagAdmission] = "Y",
ClaimData, ClaimData[Producto] - "Médico",
PlanYear[PlanYearStatus] á "Prior" ),
CALCULAR (
SUM ( MemberMonths[TotalMembers] ), PlanYear[PlanYearStatus] á "Prior" )
)
* 1000 * CALCULATE ( DISTINCTCOUNT ( MemberMonths[MonthStart] ), FILTER ( PlanYear, PlanYear[PlanYearStatus] ? "Prior" )
) )
Quiero que esta medida ignore una de las segmentaciones de mi página que tengo en la parte superior de la página llamada PlanYear. Necesito actualizar la medida para que independientemente de la selección en la segmentación de PlanYear; mi medida siempre calcula de la misma manera y no se ve afectada por la selección.
La segmentación de PlanYear utiliza el campo 'PlanYear'[PlanYear]:
Capture70.PNG
Como puede ver en la fórmula para la medida, tengo varios criterios de filtro. Necesito agregar algún tipo de criterio adicional para que simplemente ignore mi segmentación PlanYear.
¿Puede ayudar, por favor?
1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

No @AW1976NOVA,

Por favor, pruebe el siguiente meaure:

YoY Admits =
(
    DIVIDE (
        CALCULATE (
            DISTINCTCOUNT ( ClaimData[ClaimID] ),
            FILTER (
                ClaimData,
                ClaimData[FacilityCat] = "Facility"
                    && ClaimData[FlagAdmission] = "Y"
                    && ClaimData[Product] = "Medical"
            ),
            PlanYear[PlanYearStatus] = "Current",
            REMOVEFILTERS ( 'PlanYear'[PlanYear] )
        ),
        CALCULATE (
            SUM ( MemberMonths[TotalMembers] ),
            PlanYear[PlanYearStatus] = "Current",
            REMOVEFILTERS ( 'PlanYear'[PlanYear] )
        )
    ) * 1000
        * CALCULATE (
            DISTINCTCOUNT ( MemberMonths[MonthStart] ),
            FILTER ( PlanYear, PlanYear[PlanYearStatus] = "Current" ),
            REMOVEFILTERS ( 'PlanYear'[PlanYear] )
        )
)
    - (
        DIVIDE (
            CALCULATE (
                DISTINCTCOUNT ( ClaimData[ClaimID] ),
                FILTER (
                    ClaimData,
                    ClaimData[FacilityCat] = "Facility"
                        && ClaimData[FlagAdmission] = "Y"
                        && ClaimData[Product] = "Medical"
                ),
                PlanYear[PlanYearStatus] = "Prior",
                REMOVEFILTERS ( 'PlanYear'[PlanYear] )
            ),
            CALCULATE (
                SUM ( MemberMonths[TotalMembers] ),
                PlanYear[PlanYearStatus] = "Prior",
                REMOVEFILTERS ( 'PlanYear'[PlanYear] )
            )
        ) * 1000
            * CALCULATE (
                DISTINCTCOUNT ( MemberMonths[MonthStart] ),
                FILTER ( PlanYear, PlanYear[PlanYearStatus] = "Prior" ),
                REMOVEFILTERS ( 'PlanYear'[PlanYear] )
            )
    )

Si esta publicación ayuda, considere Aceptarla como la solución para ayudar a los demás miembros a encontrarla más rápidamente.

Saludos

Dedmon Dai

View solution in original post

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

No @AW1976NOVA,

Por favor, pruebe el siguiente meaure:

YoY Admits =
(
    DIVIDE (
        CALCULATE (
            DISTINCTCOUNT ( ClaimData[ClaimID] ),
            FILTER (
                ClaimData,
                ClaimData[FacilityCat] = "Facility"
                    && ClaimData[FlagAdmission] = "Y"
                    && ClaimData[Product] = "Medical"
            ),
            PlanYear[PlanYearStatus] = "Current",
            REMOVEFILTERS ( 'PlanYear'[PlanYear] )
        ),
        CALCULATE (
            SUM ( MemberMonths[TotalMembers] ),
            PlanYear[PlanYearStatus] = "Current",
            REMOVEFILTERS ( 'PlanYear'[PlanYear] )
        )
    ) * 1000
        * CALCULATE (
            DISTINCTCOUNT ( MemberMonths[MonthStart] ),
            FILTER ( PlanYear, PlanYear[PlanYearStatus] = "Current" ),
            REMOVEFILTERS ( 'PlanYear'[PlanYear] )
        )
)
    - (
        DIVIDE (
            CALCULATE (
                DISTINCTCOUNT ( ClaimData[ClaimID] ),
                FILTER (
                    ClaimData,
                    ClaimData[FacilityCat] = "Facility"
                        && ClaimData[FlagAdmission] = "Y"
                        && ClaimData[Product] = "Medical"
                ),
                PlanYear[PlanYearStatus] = "Prior",
                REMOVEFILTERS ( 'PlanYear'[PlanYear] )
            ),
            CALCULATE (
                SUM ( MemberMonths[TotalMembers] ),
                PlanYear[PlanYearStatus] = "Prior",
                REMOVEFILTERS ( 'PlanYear'[PlanYear] )
            )
        ) * 1000
            * CALCULATE (
                DISTINCTCOUNT ( MemberMonths[MonthStart] ),
                FILTER ( PlanYear, PlanYear[PlanYearStatus] = "Prior" ),
                REMOVEFILTERS ( 'PlanYear'[PlanYear] )
            )
    )

Si esta publicación ayuda, considere Aceptarla como la solución para ayudar a los demás miembros a encontrarla más rápidamente.

Saludos

Dedmon Dai

Syndicate_Admin
Administrator
Administrator

No estoy seguro de dónde agregar la función RemoveFilter a mi medida. ¿Cómo puedo agregar la función RemoveFilter mientras mantengo mis filtros existentes en su lugar? Escribirlo en DAX es un poco confuso.

YoY admite la admisión de la empresa
( DIVIDE (
CALCULAR (
DISTINCTCOUNT ( ClaimData[ClaimID] ),
FILTER ( ClaimData, ClaimData[FacilityCat] - "Facilidad"),
ClaimData, ClaimData[FlagAdmission] = "Y",
ClaimData, ClaimData[Producto] - "Médico",
PlanYear[PlanYearStatus] á "Actual" ),
CALCULAR (
SUM ( MemberMonths[TotalMembers] ), PlanYear[PlanYearStatus] á "Current" )
)
* 1000 * CALCULATE ( DISTINCTCOUNT ( MemberMonths[MonthStart] ), FILTER ( PlanYear, PlanYear[PlanYearStatus] ? "Current" )
) )
-
( DIVIDE (
CALCULAR (
DISTINCTCOUNT ( ClaimData[ClaimID] ),
FILTER ( ClaimData, ClaimData[FacilityCat] - "Facilidad"),
ClaimData, ClaimData[FlagAdmission] = "Y",
ClaimData, ClaimData[Producto] - "Médico",
PlanYear[PlanYearStatus] á "Prior" ),
CALCULAR (
SUM ( MemberMonths[TotalMembers] ), PlanYear[PlanYearStatus] á "Prior" )
)
* 1000 * CALCULATE ( DISTINCTCOUNT ( MemberMonths[MonthStart] ), FILTER ( PlanYear, PlanYear[PlanYearStatus] ? "Prior" )
) )

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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

Top Solution Authors