Cómo cambiar el promedio total en una matriz a sumar

Un usuario Pregunto ✅

JosephOutlaw

Tengo el promedio de los valores de mi columna. Me gustaría encontrar la suma total de los valores promedio.

Por ejemplo … El promedio de TIME_IN_STAGE (46 + 35) Estoy buscando 81.

)Promedio PNG

Tengo el promedio de los valores de mi columna. Me gustaría encontrar la suma total de los valores promedio.

Por ejemplo … El promedio de TIME_IN_STAGE que estoy buscando 81.

Busqué en la comunidad y encontré este bloque de código.

https: //community.powerbi.com/t5/Desktop/Change-subtotal-calculation-of-matrix-from-Average-to-Sum/t …

AverageTotal =
SUMX (
    SUMMARIZE ( Table; Group_Column; "Average"; AVERAGE ( Table[Column] ) );
    AVERAGE ( Table [Column]  )
)

Intenté esto, sin embargo, todavía no lo entendí.

.AverageTotal (DaysInStage) =
SUMX (
RESUMEN (vw_PBI_FACT_FPA_PIPELINE_VELOCITY,
vw_PBI_FACT_FPA_PIPELINE_VELOCITY[StageName],
«TIME_IN_STAGE», PROMEDIO (vw_PBI_FACT_FPA_PIPELINE_VELOCITY[TIME_IN_STAGE])),
PROMEDIO (vw_PBI_FACT_FPA_PIPELINE_VELOCITY[TIME_IN_STAGE] )
)

No estoy seguro de dónde me estoy equivocando.

Hola @JosephOutlaw

Gracias al intercambio de Greg_Deckler, funciona cuando se usa este método.

1.png

Measure 3 =
VAR temtable =
    SUMMARIZE (
        ALLSELECTED ( Sheet3 ),
        [stage name],
        "average", MIN ( [time_in_stage] )
    )
VAR total =
    SUMX (
        GROUPBY (
            temtable,
            [stage name],
            "gatagre", AVERAGEX ( CURRENTGROUP (), [average] )
        ),
        [gatagre]
    )
RETURN
    IF (
        HASONEVALUE ( Sheet3[stage name] ),
        AVERAGE ( Sheet3[time_in_stage] ),
        total
    )

Atentamente

Maggie

Hola @JosephOutlaw

Gracias al intercambio de Greg_Deckler, funciona cuando se usa este método.

1.png

Measure 3 =
VAR temtable =
    SUMMARIZE (
        ALLSELECTED ( Sheet3 ),
        [stage name],
        "average", MIN ( [time_in_stage] )
    )
VAR total =
    SUMX (
        GROUPBY (
            temtable,
            [stage name],
            "gatagre", AVERAGEX ( CURRENTGROUP (), [average] )
        ),
        [gatagre]
    )
RETURN
    IF (
        HASONEVALUE ( Sheet3[stage name] ),
        AVERAGE ( Sheet3[time_in_stage] ),
        total
    )

Atentamente

Maggie

Greg_Deckler

Vea si esto ayuda:

https: //community.powerbi.com/t5/Quick-Measures-Gallery/Matrix-Measure-Total-Triple-Threat-Rock-amp -…

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *