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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
wzuniga
Helper I
Helper I

Promedio acumulado por semana

hola buenas, 
necesito de su ayuda para crear una medida y asi obtener el valor del promedio acumulado por semana, esta medida la he intentado crear de muchas formas sin exito alguno. Mi tbla se configura de la siguiente  forma con las siguientes medidas:

Promedio condicion = SUM('Muestreo Indicadores'[sumCondicion])/SUM('Muestreo Proceso'[ConteoGeneral]) *100
Promedio fruta blanda indicador =SUM('Muestreo Indicadores'[sumFrutoBlando])/SUM('Muestreo Proceso'[ConteoGeneral]) *100
promedio Lineal Indicador = ([Promedio condicion]+ [Promedio fruta blanda indicador])/2



wzuniga_0-1736476060575.png

dejo excel con estructura de datos de la tbla 
muestreo Indicadores.xlsx


el resultado esperado
para la semana 44: 91,67)/1
para la semana 45: (91,67+ 92,40 )/2
para la semana 46: (91,67+ 92,40+95,46 )/3
y asi sucesivamente...

desde ya les agradezco todo su apoyo y experiencia, Gracias!

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Hola @Syndicate_Admin ,

Reconozco mucho la idea de Jihwan_Kim, pero creé un formulario de todos modos.

vyilongmsft_0-1736736247730.png

Así que creo que puedes crear una columna calculada y aquí está el código DAX.

Column = 
VAR CurrentRow = 'Table'[Number]
RETURN
    DIVIDE(
        SUMX(
            FILTER(
                'Table',
               'Table'[Number] <= CurrentRow
            ),
            'Table'[Value]
        ),
        CurrentRow
    )

vyilongmsft_1-1736736499943.png

Saludos

Yilong Zhou

Si esta publicación ayuda, considere Acéptalo como la solución para ayudar a los demás miembros a encontrarlo más rápidamente.

Syndicate_Admin
Administrator
Administrator

Hola

Intenté crear un archivo pbix de muestra como se muestra a continuación.

Verifique la imagen a continuación y el archivo pbix adjunto.

Una de las formas de lograrlo es utilizar la función WINDOW DAX en la medida.

Función WINDOW (DAX) - DAX | Microsoft Learn

expected result: =
VAR _t =
    ADDCOLUMNS (
        WINDOW (
            1,
            ABS,
            0,
            REL,
            ALL ( 'calendar'[Year-Month], 'calendar'[Year-Month sort] ),
            ORDERBY ( 'calendar'[Year-Month sort], ASC )
        ),
        "#avgsalespermonth", [average sales per month:]
    )
VAR _countrows =
    COUNTROWS ( _t )
RETURN
    IF (
        NOT ISBLANK ( [average sales per month:] ),
        SUMX ( _t, [#avgsalespermonth] ) / _countrows
    )

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Top Kudoed Authors