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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
RachelQ
Regular Visitor

Calculate Average of a Measure

RachelQ_0-1742910400404.png


Gallons consumed is a measure that is supposed to take the Sum of Total Miles divided by the Average MPG. MPG is also a measure that is Sum of Total Miles divided by Sum of Gallons Purchased. 
So ideally, it would be 

IL - 327053.96 / 5.70 = 57377.89 gallons consumed
IN -  573683.22 / 5.70 = 100646.18 gallons consumed
OH - 35671.18 / 5.70 = 6258.10 gallons consumed

But right now it is diving by 9.87, 4.51. and 9.37 and just equaling the sum of gallons purchased.

How can I get it to divide by the average of the MPG on my table?

1 ACCEPTED SOLUTION
sjoerdvn
Super User
Super User

Gallons Consumed = DIVIDE(SUM(Table[Total Miles]), CALCULATE([MPG],ALL()))

View solution in original post

1 REPLY 1
sjoerdvn
Super User
Super User

Gallons Consumed = DIVIDE(SUM(Table[Total Miles]), CALCULATE([MPG],ALL()))

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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