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
Pedro_R
New Member

Participación dentro de una Jerarquía

Tengo un conjunto de datos con una jerarquía y un valor, algo como esto:

Nivel 1Nivel 2Nivel 3Valor
acategoría 1clase 1300
acategoría 1clase 2200
acategoría 2clase 1500

Necesito saber cómo podría ver el % respetado cada nivel dentro de un árbol de descomposición o matriz para mostrarlo en la misma columna.

Por ejemplo, si selecciono solo el nivel 1 y el nivel 3, tengo que mostrar el 80% para la clase 1, pero si selecciono los niveles 1 y 2 tengo que ver el 50% en la categoría 1.

¿Cómo pude conseguirlo?

2 REPLIES 2
v-deddai1-msft
Community Support
Community Support

Hola

Puede utilizar la función ISINSCOPE para calcularla:

Measure =

VAR A =

    CALCULATE ( SUM ( 'Table'[Value] ), ALL ( 'Table' ) )

RETURN

    IF (

        ISINSCOPE ( 'Table'[Level 2] ),

        IF (

            ISINSCOPE ( 'Table'[Level 3] ),

            SUM ( 'Table'[Value] ) / A,

            CALCULATE (

                SUM ( 'Table'[Value] ),

                FILTER ( 'Table', 'Table'[Level 2] IN DISTINCT ( 'Table'[Level 2] ) )

            ) / A

        ),

        CALCULATE (

            SUM ( 'Table'[Value] ),

            FILTER ( 'Table', 'Table'[Level 1] IN DISTINCT ( 'Table'[Level 1] ) )

        ) / A

    )

Untitled picture1.png

Si este post ayuda, por favor considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

Saludos

Dedmon Dai

amitchandak
Super User
Super User

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.