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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Syndicate_Admin
Administrator
Administrator

Total acumulado con con cambio a Principal

Recientemente trabajé con este grupo para resolver un problema total acumulativo - detalles aquí: https://community.powerbi.com/t5/Desktop/Sum-of-two-values-another/m-p/2895803

Detalles de la solución:

Screen Shot 2022-11-21 at 9.45.35 AM.png

Resultado de la solución:

vpollymsft_0-1668390304572.png

Sin embargo, la publicación original se basó en el valor inicial de "Saldo del préstamo" que no cambió. Ahora me enfrento a un valor principal cambiante (ver más abajo) y, por lo tanto, mi total acumulado no refleja correctamente.

Screen Shot 2022-11-21 at 9.41.15 AM.png

Como puede ver, "Saldo del préstamo" ha cambiado para reflejar el aumento de la actividad de $ 146,500, pero "saldo futuro" y "columna" no lo han hecho.

Avíseme si puedo proporcionar más información que pueda ayudar a aclarar las cosas.

Gracias

JNW221

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

@jnw221 ,

La prueba se ajusta a lo siguiente:

cumulative total column = 
'Table'[Loan Balance] + 'Table'[Cumulative Interest]
Column = 
VAR indedx1 =
    CALCULATE (
        MAX ( 'Table'[Index] ),
        FILTER ( 'Table', 'Table'[Loan Balance] = EARLIER ( 'Table'[Loan Balance] ) )
    )
RETURN
    IF (
        'Table'[Index] <> indedx1,
        'Table'[cumulative total column]
            + CALCULATE (
                MAX ( 'Table'[Cumulative Interest] ),
                FILTER ( ALL ( 'Table' ), 'Table'[Index] = EARLIER ( 'Table'[Index] ) + 1 )
            ),
        'Table'[cumulative total column]
            + CALCULATE (
                MAX ( 'Table'[Cumulative Interest] ),
                FILTER ( ALL ( 'Table' ), 'Table'[Index] = indedx1 )
            )
    )
Measure 2 = SUMX('Table','Table'[Column])

Resultado de salida:

vluwangmsft_0-1669102911014.png

Saludos

Lucien

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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

Top Solution Authors