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
Anonymous
Not applicable

Adición de un promedio semanal, de 14 días y 30 días

Hola Comunidad,

Tengo varios d.D. de los que estoy extrayendo datos. Uno de ellos se adjunta a continuación. Tengo tarjetas en mis dashboards con la suma de Ganancias, ingresos, unidades vendidas, ingresos de promociones y algunas columnas más calculadas para rangos de cuatro tiempos. Ayer, últimos 7 días, últimos 14 días, últimos 30 días. Se ve como abajo.

1) Ayer(4/25/2020) 2) Últimos 7 días (4/19 - 4/25)

Beneficio beneficio

Ingresos por ingresos

Unidades Unidades

Ingresos de Promoción, Ingresos de Promoción,

Más... Más...

3) últimos 14 días (4/12 - 4/25) 4) Últimos 30 días (3/25 - 4/25)

Beneficio beneficio

Ingresos por ingresos

Unidades Unidades

Ingresos de Promoción, Ingresos de Promoción,

Más... Más...

Para obtener estos valores continuos, simplemente agrego filtros de fechas relativas en el panel de filtros para mostrar los datos del último 1 día, los últimos 7 días, los últimos 14 días, los últimos 30 días.

Ahora, Ingresos, las unidades vienen de la tabla 1, y el resto viene de la tabla 2. Ambas tablas tienen una relación con la tabla de fechas.

Mi objetivo es obtener el formato adjunto en adjunto "Archivo necesario de salida"

Salida necesaria: https://docs.google.com/document/d/1gII1YB3VYNnYPeBEPCshv4MUNm0Xa7rhHa9c0agIleo/edit?usp=sharing

Datos: https://docs.google.com/spreadsheets/d/1P1Tfd66SCOCKtUU_MK-DqeE_KgMjipDlPb6i5P38bAg/edit?usp=sharing

1 REPLY 1
v-shex-msft
Community Support
Community Support

HI @VatsalRaval,

Puede consultar el siguiente blog para utilizar la función de fecha para definir manualmente el intervalo de fechas del filtro para calcular los resultados graduales:

Inteligencia del tiempo "The Hard Way" (TITHW)

Yesterday =
CALCULATE (
    AVERAGE ( Table[Sales] ),
    FILTER ( Table, [Date] = TODAY() - 1 )
)

Last week =
CALCULATE (
    AVERAGE ( Table[Sales] ),
    FILTER ( Table, [Date] >= TODAY () - 7 && [Date] < TODAY () )
)

Last 2 week =
CALCULATE (
    AVERAGE ( Table[Sales] ),
    FILTER ( Table, [Date] >= TODAY () - 14 && [Date] < TODAY () )
)

Last Month =
CALCULATE (
    AVERAGE ( Table[Sales] ),
    FILTER ( Table, [Date] >= TODAY () - 30 && [Date] < TODAY () )
)

saludos

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.