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
colourfullife
Post Partisan
Post Partisan

Línea acumulativa wite fecha y condición

Hola a todos

Necesito tu ayuda.

He adjuntado mi archivo ficticio : ENLACE

Quiero hacer una línea acumulada para sumar una fila por fechas.

el problema es cuando suma la fila, toma todos los valores no sólo con dates..

usé este código

2. Entrega prevista ?
VAR _End - CALCULATE ( MAX ( 'Sheet1'[FORECASTED_DELIVERY_DATE] ), ALL ( 'calendario' ))
devolución
SI (
_End < MIN ( 'calendario'[Fecha] ),
BLANK (),
CALCULATE(
SUM('Sheet1'[PO_LINE_QUANTITY]),USERELATIONSHIP('Sheet1'[FORECASTED_DELIVERY_DATE],'calendar'[Fecha]),
FILTRO(
ALLSELECTED('calendar'[Fecha]),
('calendario'[Fecha] <-MAX('calendario'[Fecha])))))))'
y el gráfico se ve así
sssshet.PNG

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hola @colourfullife

He notado que en su tabla Sheet 1, hay algunos valores en blanco en FORECASTED_DELIVERY_DATE / REAL RRR DATE / ACTUAL_DELIVERY_DATE columnas. ¿Quiere decir que desea excluir estas filas en blanco cuando la medida suma filas? Si es así, puede agregar un filtro NOT(ISBLANK(Sheet1[FORECASTED_DELIVERY_DATE])) al final de la medida como se muestra a continuación.

2. Forecasted Delivery =
VAR _End =
    CALCULATE ( MAX ( 'Sheet1'[FORECASTED_DELIVERY_DATE] ), ALL ( 'calendar' ) )
RETURN
    IF (
        _End < MIN ( 'calendar'[Date] ),
        BLANK (),
        CALCULATE (
            SUM ( 'Sheet1'[PO_LINE_QUANTITY] ),
            USERELATIONSHIP ( 'Sheet1'[FORECASTED_DELIVERY_DATE], 'calendar'[Date] ),
            FILTER (
                ALLSELECTED ( 'calendar'[Date] ),
                 ( 'calendar'[Date] <= MAX ( 'calendar'[Date] ) )
            ),
            NOT ( ISBLANK ( Sheet1[FORECASTED_DELIVERY_DATE] ) )
        )
    )

Agregue códigos similares a otras medidas. Entonces obtendrás lo que necesitas.

Saludos

Equipo de apoyo a la comunidad _ Jing Zhang

Si este post ayuda, considera Aceptarlo como la solución para ayudar a otros miembros a encontrarlo.

lbendlin
Super User
Super User

Las medidas acumulativas generalmente se calculan utilizando las funciones del agregador "X" como SUMX. ¿Has considerado esto?

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.