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
Anonymous
Not applicable

Calculating energy use, getting different results.

Hi,

 

I'm trying to calculate the total, idle and active energy use from power measurements. I'm trying to do this by taking the average power over a given timespan, and multiplying this by the amount of hours that this timespan is over. However, the sum of the idle and active energy use is different from the total energy use. 

 

The scripts I use are: 

 
RunTime =
CALCULATE(
    COUNTROWS(DateTimes),
        FILTER(DateTimes,DateTimes[Status1]=1)
)/3600

 

ActiveEnergyUse = AVERAGEX(FILTER(Sensor1,DateTimes[Status1]=1),Sensor1[P(W)])*Sensor1[RunTime]/1000
 
IdleEnergyUse = AVERAGEX(FILTER(Sensor1,Sensor1[Status]=0),[P(W)])*(168-Sensor1[RunTime])/1000
 
TotalEnergyUse = AVERAGE(Sensor1[P(W)])*24*7/1000
 
The result is:
JKock_0-1684998593510.png

 

what is the cause of the Active and Idle energy uses not adding up to the total energy use? 

3 REPLIES 3
Anonymous
Not applicable

The difficulty here is that the power data is sent randomly, not in a fixed interval. This makes it relatively hard to extrapolate the energy use data from the power data. 

tamerj1
Super User
Super User

Hi @Anonymous 
Please try

TotalEnergyUse =
AVERAGEX ( Sensor1, [P(W)] * Sensor1[RunTime] ) / 1000
Anonymous
Not applicable

Hi Tamer,

 

this sadly does not work, it gives a result of 0 (when I remove the /1000, it gives a result of 0,59). I think this command takes the average of the power data *43 hours for each row, which is not the right result. 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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