Forum Discussion

LeviCaers's avatar
LeviCaers
Frequent Visitor
8 years ago
Solved

AVERAGEX not working properly

Hi 

I need to create a table that contains the average score per question, so for identical questions it should give the same average value.
I have tried the following statements

AveragePillarScore = AVERAGEX(Questions,Result[Score])

AveragePillarScore = CALCULATE( AVERAGEX( FILTER( Result, Result[Question]= Result[Question]),Result[Score]))

But these both give the individual score.

Anyone expert out there that can correct my formula?

Cheers

1 Reply

  • v-cherch-msft's avatar
    v-cherch-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi LeviCaers

     

    You may use EARLIER Function to create a column.

    Column = 
    AVERAGEX (
        FILTER ( Table2, Table2[question] = EARLIER ( Table2[question] ) ),
        Table2[Score]
    )

     

    Regards,

    Cherie