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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Syndicate_Admin
Administrator
Administrator

Fórmula DAX para calcular el promedio móvil basado en el mes

Hola

Necesito calcular el promedio móvil de la columna Puntaje general, pero basado en los diferentes meses. Por ejemplo, según la captura de pantalla, me gustaría comenzar un nuevo promedio móvil para marzo el 6/03/2023 y continuar hasta llegar a abril.

¿Qué fórmula DAX lograría esto?

Estaba pensando en algún tipo de declaración IF basada en si el mes de la siguiente fila era el mismo. Pero no estoy muy seguro de cómo implementar.

¡Gracias!

Shawry_0-1679537429575.png

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

@Shawry , Necesitas una medida como

Promedio de 3 meses = Maxx(Valores('Fecha'[MES Año]), CALCULAR(PromedioX(Valores('Fecha'[MES Año]),calcular(Suma('Tabla'[Valor)))
,DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-3,MONTH)) ,DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-3,MONTH))

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.