Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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

 


Capture.PNG

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
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

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-lili6-msft
Community Support
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

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.