Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Calculate filter

Hello guys, 

 

I have some issues with a meassure, im trying to get the Average score of a customer survey, there are 5 questions, but the most important one are only three. How could I calculate the average without taking into consideration the other 2 questions? I dont want to remove them from the model because at some point we would like to know the average score of each one. 

 

Here is how the data is modeled. What I need is the average of question 2, 3 and 4. 

 

Is this the right way to do it?

 

 
CSAT Score Agents = CALCULATE(
                        AVERAGE(Surveys_Details[Score]), 
                            FILTER(
                                Surveys_Details, 
                                    Surveys_Details[Survey Question] in {"Pregunta2", "Pregunta3", "Pregunta4"})
)
 

Thanks

 


  • hi, Anonymous 

    Yes, you could use your formula in calculation.

    For your requirement, there are many ways could be done, you just add a filter conditional in formula.

    Your formula and GeraldZ's way are all right ways.

     

    Best Regards,

    Lin

     

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    I would add another column that works as an indicator, something like "Include in Avg" and you can have a Y or N or 1 or 0 then add that as a FILTER criteria in your CALCULATE formula.

  • v-lili6-msft's avatar
    v-lili6-msft
    Community Support

    hi, Anonymous 

    Yes, you could use your formula in calculation.

    For your requirement, there are many ways could be done, you just add a filter conditional in formula.

    Your formula and GeraldZ's way are all right ways.

     

    Best Regards,

    Lin