Forum Discussion

ClementSendra's avatar
ClementSendra
New Member
7 years ago
Solved

averageif

Hello,   I try to integrate a column in a table which would calculate an average depending on the value in a column. I know that it is possible to use a formula like :    CALCULATE ( AVERAGE ( '...
  • AlB's avatar
    7 years ago

    Hi ClementSendra

    Can you show with an example what you need?  A small table with sample data and the required result.

    I don't understand what you mean by

    ... i don't want to precise a specific value like ( "X"), but compare the value of each row.

     

    Maybe this:

    NewColumn =
    CALCULATE (
        AVERAGE ( 'table'[column2] ),
        FILTER ( 'table', 'table'[column1] = EARLIER ( 'table'[column1] ) )
    )