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
Syndicate_Admin
Administrator
Administrator

Cómo agregar el importe de ingresos del año anterior en la tabla.

Hola a todos

A continuación Expresión generará el último año Importe de ingresos :-

COMP_REV : CALCULATE(SUM('COMP'[AMT REVENUE_C]),FILTER('Date', 'Date'[Year] á CALCULATE(max('Date'[Year]), FILTER(ALL('COMP'),'COMP'[COMPETITOR]-MAX('COMP'[COMPETITOR]))))
¿Puedo saber cómo modificar la expresión anterior y obtener las ventas del año anterior?
1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

Usted necesita utilizar TODO para su calendario - de lo contrario no se puede cambiar el período de tiempo. También tenga en cuenta la resta 1 después de MAX

COMP_REV =
CALCULATE (
    SUM ( 'COMP'[AMT REVENUE_C] ),
    FILTER (
        ALL ( 'Date' ),
        'Date'[Year]
            = CALCULATE (
                MAX ( 'Date'[Year] ) - 1,
                FILTER ( ALL ( 'COMP' ), 'COMP'[COMPETITOR] = MAX ( 'COMP'[COMPETITOR] ) )
            )
    )
)

View solution in original post

4 REPLIES 4
Syndicate_Admin
Administrator
Administrator

Hola

Pruebe estas dos medidas:

Measure = SUM('COMP'[AMT REVENUE_C])
Measure 4 = CALCULATE([Measure],PREVIOUSYEAR('Date'[Date]))

Vea la imagen a continuación. Veo muchas más filas que vienen cuando arrastro mis medidas sugeridas al objeto visual, pero eso es probablemente porque algunos filtros que ha aplicado (que no entiendo).

Espero que esto ayude.

Untitled.png

Hola Ask

Gracias por compartir. es debido a mi competidor últimos ingresos algunos son 2020 , algunos son 2018. La solución mate funciona bien,

Paul

Syndicate_Admin
Administrator
Administrator

Usted necesita utilizar TODO para su calendario - de lo contrario no se puede cambiar el período de tiempo. También tenga en cuenta la resta 1 después de MAX

COMP_REV =
CALCULATE (
    SUM ( 'COMP'[AMT REVENUE_C] ),
    FILTER (
        ALL ( 'Date' ),
        'Date'[Year]
            = CALCULATE (
                MAX ( 'Date'[Year] ) - 1,
                FILTER ( ALL ( 'COMP' ), 'COMP'[COMPETITOR] = MAX ( 'COMP'[COMPETITOR] ) )
            )
    )
)

Wow Matt que el conocimiento en PBI es muy profundo. Gracias

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.