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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Syndicate_Admin
Administrator
Administrator

Fecha total y máxima de ejecución

Tengo una tabla simple con el número de semana del producto y una medida total corriente:

Running Total = 
var maxdate = MAX(week)
return
CALCULATE(SUM(quantity),week<=maxdate)

Producto141516
Macbook204060
PC1020

Mi problema es que no estoy obteniendo el total de ejecución para la semana 16 de PC del producto. Quiero que muestre 20

No hay datos para esa semana en la tabla, que es solo Producto / Semana / Cantidad.

Intenté vincularlo a una tabla de tiempos, pero todavía tengo el mismo problema

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

Hola @PowerBITestingG,

¿Podría intentar esto?

Running Total = 
VAR MaxDate = MAX(week)
RETURN
CALCULATE(
    SUM(quantity),
    FILTER(
        ALL(week),
        week <= MaxDate
            && (ISBLANK(SUM(quantity)) || week > Max(week[week]))
    )
)

Avíseme si necesita más ayuda.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors
Top Kudoed Authors