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

Emisión sobre la suma acumulada

Estimados todos,

por favor, tengo el siguiente conjunto de datos y me gustaría medir la suma acumulada por mes de [YTD_in/out]_

LD_1-1656000496329.png

Pruebo la siguiente estructura:

Dónde LastM = SELECTEDVALUE('Proyección Y'[Mes])

Var Dep = SELECTEDVALUE('Y Projection'[Departamento])
Devolución
CALCULAR(
SUM('Proyección Y'[YTD_IN/OUT]),
'Proyección Y'[Mes]<=LastM && 'Proyección Y'[Departamento]=Dep

pero la Columna [Colonna] no mostró ningún resultado, sino también ningún error.

Por favor, ¿cómo puedo resolverlo?

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

@LD

Por favor, utilice

=
VAR LastM = 'Y Projection'[Month]
VAR CurrentDepTable =
    CALCULATETABLE (
        'Y Projection',
        ALLEXCEPT ( 'Y Projection', 'Y Projection'[Department] )
    )
RETURN
    SUMX (
        FILTER ( CurrentDepTable, 'Y Projection'[Month] <= LastM ),
        'Y Projection'[YTD_IN/OUT]
    )

Gracias Tamerj1,

Está bien y el valor es exacto!!!!

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.