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
summer18
Helper III
Helper III

Total de carreras por las últimas N semanas

Actualmente tengo fórmula total en ejecución que funciona, pero también tendría que obtener el total de ejecución de las últimas 7 semanas. ¿Puede alguien ayudarme en esta fórmula?

Aquí está mi fórmula para Running Total que funciona:

Total de ejecución en Ventas ?
CALCULATE(SUM('Ventas'[sales_amount]),
FILTRO(
ALLSELECTED('Fecha'[Semana]),
ISONORAFTER('Date'[Week], MAX('Date'[Week]), DESC)
))

3 REPLIES 3
amitchandak
Super User
Super User

@summer18 , Pruebe uno de estos dos

Running total in Sales =
CALCULATE(SUM('Sales'[sales_amount]),
    FILTER(
        ALLSELECTED('Date'[Week]),
        'Date'[Week]<= MAX('Date'[Week]) &&
   'Date'[Week]>= MAX('Date'[Week])-7
    ))
 
Running total in Sales =
CALCULATE(SUM('Sales'[sales_amount]),
    FILTER(
        ALL('Date'[Week]),
        'Date'[Week]<= MAX('Date'[Week]) &&
  'Date'[Week]<= MAX('Date'[Week]) -7
    ))

Consulte mi blog en Semana

https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...

https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3

Hola @amitchandak ,

El total en ejecución funciona si es el mismo mes, por lo que cuando es diferente mes el total de ejecución se restablece.

La salida esperada es la columna verde resaltada:

pic1.jpg

Hola @summer18

Crear una columna

index1 = INT(([Week]-1)/7)

Crear una medida

Measure =
CALCULATE (
    SUM ( 'Table 2'[sale amount] ),
    FILTER (
        ALLSELECTED ( 'Table 2' ),
        'Table 2'[Year] = MAX ( 'Table 2'[Year] )
            && 'Table 2'[Week] <= MAX ( 'Table 2'[Week] )
            && 'Table 2'[index1] = MAX ( 'Table 2'[index1] )
    )
)

Capture7.JPGCapture8.JPG

Saludos
Maggie
Equipo de apoyo a la comunidad _ Maggie Li
Si este post ayuda, entonces considera Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

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.