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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ajbogle
Helper I
Helper I

Calculating Averages

Hi guys,

 

Stuck on trying to figure out a solution on calculating averages. Let me do my best to explain my dataset, I've attached a screenshot and blocked out any confidential information.

 

cpw.png

 

I want to focus on February and explain how our metrics work. I'm focusing soley on CPW which is Cost per Watt. The current calculation is as follows: [Total Payroll] / ([Total kW] * 1000)

 

Therefore, taking February's data $125,811 / (475.40 * 1000) = $0.26 which is 100% correct. However, I want to take an average of all the rows (i.e. 0.74, 0.09, 0.36, 0.24, 0, 0.27, 0.20, 0.29 = $0.27and additionally, I want to do that again but removing the zeros which would come out to $0.31.

 

I was able to do this for the column total with the following measure:

CPW = AVERAGEX(KEEPFILTERS(VALUES('Crew Gusto'[Payroll Month Year])),CALCULATE(DIVIDE('Crew Gusto'[Crew Payroll],('Crew Gusto'[Crew kW per Gusto] * 1000))))

 

 

Total Numbers: $1,039,924 / ( 5999.94 * 1000) = $0.17 but with that measure it comes out to $0.24. I'd like to replicate that for each Row Subtotal.

 

 

Thanks!

1 REPLY 1
Hei_aQing
Helper I
Helper I

Hi @ajbogle 

 

Would you mind simplifying your data and providing an example file? I'd like to try it.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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