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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Syndicate_Admin
Administrator
Administrator

Cálculo Total general

Yo uso esta medida

Variación semana tras semana

Estoy obteniendo los valores correctos en cuanto a filas, pero cuando ve el total general de la medida de columna, es incorrecto.

Tiger2514555_1-1698834079010.png

My code for measure Variación semana tras semana

Cambio semana tras semana =
DÓNDE varCurrentDate = ..MAX('Fecha'[Fecha])
DÓNDE varCurrentWeek = ..MAX('Fecha'[WeekYearNumber])
DÓNDE varAnteriorSemana =
MAXX(
FILTRO(
TODO('Fecha'[Fecha],'Fecha'[WeekYearNumber]),
'Fecha'[Fecha] = varCurrentDate - 7
),
'Fecha'[WeekYearNumber]
)
DÓNDE varCurrentWeekTotal = [Total general]
DÓNDE varPreviousWeekTotal =
CALCULAR(
SUMA('Resumen de la demandaAPS'[cantidad]),
'Fecha'[WeekYearNumber] = varAnteriorSemana,
ELIMINAR FILTROS('Fecha')
)
DEVOLUCIÓN
si(
ISBLANK(varCurrentWeekTotal),
ESPACIO EN BLANCO(),
varCurrentWeekTotal - varPreviousWeekTotal
)

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Lo intenté y no funcionó, esta es mi base de datos.

Tiger2514555_0-1699243764572.png

Syndicate_Admin
Administrator
Administrator

@Tiger2514555 ,

Aquí hay dos métodos que puedes probar.

Método 1:

Cree una nueva medida.

New Measure= SUMX('DemandSummaryAPS', [Week over Week Change])

Método 2:

Cree también una nueva medida.

New Measure =
VAR _TABLE =
    SUMMARIZE (
        'DemandSummaryAPS',
        [planCode],
        [Grand Total],
        [Week Number],
        "ABC", [Week over Week Change]
    )
RETURN
    SUMX ( _TABLE, [ABC] )

Artículos similares:

Resuelto: subtotales de columna incorrectos - Microsoft Fabric Community

Resuelto: Re: Suma de valores en una medida con medida de división - Microsoft Fabric Community

Saludos

Esteban Tao

Si esta publicación ayuda, considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

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.