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
Anonymous
Not applicable

¿Cómo cambiar el modelo de datos para adaptarse al siguiente requisito?

Hola

Tengo un requisito donde he mostrado los valores en el objeto visual de matriz.

Los datos son así:

karthikbv4_0-1599229846817.png

El valor "null" en el nivel2 y el nivel3 indican que la puntuación es para ese nivel1 en particular.

por ejemplo: En la línea 1, los valores para level2 y level3 son null, lo que indica que la puntuación1 y la puntuación 2 para el nivel 1 son 3.5 y 3.5 respectivamente.

Hay un total de 3 niveles. Deben mostrarse en jerarquía, como:

Nivel 1

Nivel 2

Nivel 3.

Por ejemplo: 2 jerarquías de nivel, va como:

Puntuación de nivel 21 score2

A 3,5 3,5

AA 3 3

A PARTIR DE 4 3

AC 4 3

B 3,2 3,2

BA 3 4

BB 4 3

¿Qué cambios debo realizar en el modelo de datos/columna para dar cabida a esto?

Cualquier ayuda es apreciada. Gracias.

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hola @karthikbv4 ,

Puede crear esta medida:

s1 = 
IF (
    ISINSCOPE ( Test[Level 2] ),
    IF ( SELECTEDVALUE ( Test[Level 2] ) <> "", SUM ( Test[score 1] ) ),
    IF (
        ISINSCOPE ( Test[Level 1] ),
        CALCULATE (
            SUM ( Test[score 1] ),
            FILTER (
                ALL ( 'Test' ),
                Test[Level 1] = SELECTEDVALUE ( Test[Level 1] )
                    && Test[Level 2] = ""
            )
        )
    )
)

La medida s2 es similar con s1:

level.png

Adjunto un archivo de muestra en el siguiente, espera ayudarle.

Best Looks,
Yingjie Li

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

View solution in original post

5 REPLIES 5
v-yingjl
Community Support
Community Support

Hola @karthikbv4 ,

Puede crear esta medida:

s1 = 
IF (
    ISINSCOPE ( Test[Level 2] ),
    IF ( SELECTEDVALUE ( Test[Level 2] ) <> "", SUM ( Test[score 1] ) ),
    IF (
        ISINSCOPE ( Test[Level 1] ),
        CALCULATE (
            SUM ( Test[score 1] ),
            FILTER (
                ALL ( 'Test' ),
                Test[Level 1] = SELECTEDVALUE ( Test[Level 1] )
                    && Test[Level 2] = ""
            )
        )
    )
)

La medida s2 es similar con s1:

level.png

Adjunto un archivo de muestra en el siguiente, espera ayudarle.

Best Looks,
Yingjie Li

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

Greg_Deckler
Super User
Super User

@karthikbv4 - Estoy bastante seguro de que querrá despoducar sus columnas de nivel.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Bien. ¿Cómo propones que no lo despvoro?

amitchandak
Super User
Super User
Anonymous
Not applicable

Gracias.

Pero, no funciona en mi caso.

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.