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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

How to do a calculation in the total row

Hi 

Totally new to BI so everything is new to me. I have this report that I have created:

russelln1_1-1661254877595.png

 

The 4 boxes in the centre below the white box display the totals for each column, which the system generates automatically.
Is there a way to display an Average figure automatically instead of a sum? So it adds them all up and then divide by 33 (that's the number of lines I'm reporting on). I.e. the first box is displaying 2959.63%, divide it by 33 and this will give me 89.69% which is the figure that I require to be displayed.

As I say I am new and a bit green.

Appreciate your help.

 

1 ACCEPTED SOLUTION
ToddChitt
Super User
Super User

Simple answer: Change the Aggregation in the Visual Setting from Sum to Average.

BUT, If the number you are aggregating is already a percentage, then it is usually NOT a good idea to show the "Average of the Percentage." Suppose you sell 500,000 of widget A at $1 each, and that average is $1. but you also sold 1 of widget B at $10. Your data may indicate that you have TWO averages, one per Widget type: $1 and $10. The Average of those two averages is $5.50 ($11 divided by 2). But the TRUE average is 500,010 divided by 500,001. To calculate that, you need the SUM of the Sales and the COUNT of Sales, and create a MEASURE that does that math with a DIVIDE statement.

Si




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Thanks for the response - Yes I know the math it's just how I apply that in to BI. Which, if I'm reading you right, is by creating a measure. Cool, I appreciate the direction.

Yes, a simple MEASURE.

And by the way, that MEASURE calculation will still exist at every sub-slice of data in that table, so if you slice/filter it by Product, or Date, or Customer, the calculation will only act on the rows of the slice, right down to a single row. 

You actually have to work hard to make your measure calculations look at something other than the current slice/context.

 

Please mark replie as Solved if appropriate.

Thanks




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





ToddChitt
Super User
Super User

Simple answer: Change the Aggregation in the Visual Setting from Sum to Average.

BUT, If the number you are aggregating is already a percentage, then it is usually NOT a good idea to show the "Average of the Percentage." Suppose you sell 500,000 of widget A at $1 each, and that average is $1. but you also sold 1 of widget B at $10. Your data may indicate that you have TWO averages, one per Widget type: $1 and $10. The Average of those two averages is $5.50 ($11 divided by 2). But the TRUE average is 500,010 divided by 500,001. To calculate that, you need the SUM of the Sales and the COUNT of Sales, and create a MEASURE that does that math with a DIVIDE statement.

Si




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors