Forum Discussion

JorgeAmache's avatar
JorgeAmache
Frequent Visitor
1 year ago
Solved

SUMARPROMEDIOS

Buenas Su gentil ayuda, cuando filtro por el campo "Evento" tengo una tabla que debe mostrar el promedio de cada "Id" y en el total debe mostrar la suma. ¿Cuál sería la formula Dax correcta?   Lam...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi JorgeAmache ,

     

    I've made a test for your reference:

    1\I assume there is a table(Table)

    2\Create a measure for this table

    Measure = 
    IF(
        ISINSCOPE('Table'[Id]),
        -- For each Id, calculate the average Value
        AVERAGE('Table'[Value]),
        -- For the total row, sum the averages of each Id
        SUMX(VALUES('Table'[Id]), CALCULATE(AVERAGE('Table'[Value])))
    )

    3\Add a table visual

     

    Best Regards,

    Bof