cancel
Showing results for
Did you mean:
Frequent Visitor

## Average measure

Hi, I have some survey data and am trying to work out the formula for a measure that will give me the average of the answers for only one of the questions. For example, with this example data, how would I get the average just for the answers for Q1?

 Question Answer Q1 7 Q1 5 Q1 6 Q2 6 Q2 4 Q2 2 Q2 7 Q3 5 Q3 3
1 ACCEPTED SOLUTION
Super User IV

@juliaellershaw , Try like

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

7 REPLIES 7
Community Support

There are two ways to do this：

1. Create calculated table.

``````Q1_avg_column =
CALCULATE(AVERAGE('Table'[amount]),FILTER('Table','Table'[quarter]="Q1"))``````

2. Result.

.

1. Create measure.

``````Q1_avg_measure =
CALCULATE(AVERAGE('Table'[amount]),FILTER('Table','Table'[quarter]=MAX('Table'[quarter])))``````

2. Place the quarter field in slice, and set Q1_ avg_ Put measure in card

3. Result.

You can downloaded PBIX file from here.

Best Regards,

Liu Yang

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

Super User IV

@juliaellershaw , Try like

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Frequent Visitor

That worked, thank you!

Super User III

Hi,

To your visual, drag Question to the visual and select Q1.  Write this measure

Hope this helps.

Regards,
Ashish Mathur
http://www.ashishmathur.com
Frequent Visitor

Thanks for the formula. I'm getting an error with this seciton "SUMMARIZE('Table','Table'[Q1]," that says it can't find the column for Q1

Super User IV

You need to replace "Table" with the actual name of your table.

Alternatively, you could just make a table visual on your report page, and add the Question column and the Answer column.  On the Answer column in the field pane, change the aggregation to average.

Regards,

Pat

Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

@mahoneypa HoosierBI on YouTube

Helper III
Measure= var x=SUMMARIZE('Table','Table'[Q1],"av",AVERAGE('Table'[7]))return AVERAGEX(x,[av])

Announcements

#### Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

#### Claim Your Badge & Digital Swag!

Check out how to claim yours today!

#### Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors
Top Kudoed Authors