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
KiranGupta15
Frequent Visitor

2a fila en 1a fila

Hola a todos

Estoy fresco a BI, tengo un problema con el cálculo delta de una columna.

Tengo un maeasure para calcular el conteo para cada rango.

¿Puede alguien ayudar a calcular el delta de la siguiente puntuación de fila.

Gracias de antemano

rangoContarPuntuaciónDelta
1241624476(244-168)
2187016843
3182612523
4166710221
516098152
61080298
793921
1 ACCEPTED SOLUTION

@KiranGupta15, es posible que desee ajustar la medida de esta manera

Delta = 
VAR __next_rank = MAX ( 'Table'[Rank] ) + 1
VAR __next_score =
    CALCULATE (
        [Score],
        'Table'[Rank] = __next_rank,
        ALL ( 'Table' )
    )
RETURN
    IF ( NOT ISBLANK ( __next_score ), [Score] - __next_score )


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

4 REPLIES 4
v-rzhou-msft
Community Support
Community Support

Hola @KiranGupta15

¿Podría decirme si su problema ha sido resuelto? Si es así, acédi es la solución. Más gente se beneficiará de ello. O todavía está confundido al respecto, por favor proporcione más detalles sobre su problema o compártame con su archivo pbix de su Onedrive for Business.

Saludos

Rico Zhou

CNENFRNL
Community Champion
Community Champion

Hola, @KiranGupta15, puedes probar esta medida

Delta = 
VAR __next_rank = MAX ( 'Table'[Rank] ) + 1
VAR __next_score =
    CALCULATE (
        MAX ( 'Table'[Score] ),
        'Table'[Rank] = __next_rank,
        ALL ( 'Table' )
    )
RETURN
    IF ( NOT ISBLANK ( __next_score ), MAX ( 'Table'[Score] ) - __next_score )

Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Gracias señor....

Mi "Puntuación" es una Medida, no una columna en la tabla.

"La columna 'Puntuación' en la tabla 'Tabla' no se puede encontrar o no se puede utilizar en esta expresión."

Este es el mensaje de error ...:

@KiranGupta15, es posible que desee ajustar la medida de esta manera

Delta = 
VAR __next_rank = MAX ( 'Table'[Rank] ) + 1
VAR __next_score =
    CALCULATE (
        [Score],
        'Table'[Rank] = __next_rank,
        ALL ( 'Table' )
    )
RETURN
    IF ( NOT ISBLANK ( __next_score ), [Score] - __next_score )


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

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.