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
aagj
Frequent Visitor

Ayuda con el total de la ejecución

Hola

Necesito el total de ejecución para empezar de nuevo cada meses nuevo, por ejemplo:

FechaVentasTotal en ejecución
2020-01-0155
2020-01-021015
2020-01-301025
2020-01-31530
2020-02-012020
2020-02-02525

Total en ejecución
CALCULATE ( SUM (
    Table1[Reserve Beginning Balance] ),
    FILTER ( ALL (
        Table1 ),
        Table1[Date] <- MAX ( Table1[Date]
    ) )
)

2 REPLIES 2
v-eachen-msft
Community Support
Community Support

Hola @aagj ,

Al principio, debe crear una nueva columna para obtener "AAAA-MM".

YM = 
FORMAT('Table'[Date],"yyyymm")

A continuación, puede usar columna o medida para obtener el total en ejecución.

Columna:

Column =
CALCULATE (
    SUM ( 'Table'[Sales] ),
    FILTER (
        'Table',
        'Table'[YM] = EARLIER ( 'Table'[YM] )
            && 'Table'[Date] <= EARLIER ( 'Table'[Date] )
    )
)

Medida:

Measure =
CALCULATE (
    SUM ( 'Table'[Sales] ),
    FILTER (
        ALLSELECTED ( 'Table' ),
        'Table'[YM] = MAX ( 'Table'[YM] )
            && 'Table'[Date] <= MAX ( 'Table'[Date] )
    )
)

Aquí está mi archivo de prueba para su referencia.

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
amitchandak
Super User
Super User

@aagj , Usar MTD con calendario de fechas

Ventas MTD: CALCULATE(SUM(Table1[Sales]),DATESMTD('Date'[Date]))

Para obtener lo mejor de la función de inteligencia del tiempo. Asegúrese de que tiene un calendario de fechas y que se ha marcado como la fecha en la vista de modelo. Además, únase a ella con la columna de fecha de su/s hecho/s. Consulte:
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

Vea si mi seminario web sobre Time Intelligence puede ayudar: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...


Apreciamos tus Felicitaciones.

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.