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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
liamcameron
New Member

Calculate a Change in Values - Omitting Errors

I have Engine hours being recorded every day across many engines across a fleet of vehicles. Occasionally the hours are put in incorrectly. I'm attempting to create a table that will show the average usage of an engine over a month. Currently I have a measure that takes max(hours) - min(hours) and works UNLESS there is an errant number in the set. 

 

i.e: below, on the 1st of january the value was 16. So clearly, my max-min would not work. Nor would simply saying "value at end of month - value at beginning of month"... though how to do that is another question!

 

Range[Asset]Range[Date]Range[Component]Range[Hours]

Allaveurte2019-01-31Port Main Engine11435
Allaveurte2019-01-30Port Main Engine11427
Allaveurte2019-01-29Port Main Engine11419
Allaveurte2019-01-28Port Main Engine11416
Allaveurte2019-01-27Port Main Engine11412
Allaveurte2019-01-26Port Main Engine11410
Allaveurte2019-01-25Port Main Engine11408
Allaveurte2019-01-24Port Main Engine11404
Allaveurte2019-01-23Port Main Engine11380
Allaveurte2019-01-22Port Main Engine11356
Allaveurte2019-01-21Port Main Engine11340
Allaveurte2019-01-20Port Main Engine11340
Allaveurte2019-01-19Port Main Engine11322
Allaveurte2019-01-18Port Main Engine11298
Allaveurte2019-01-17Port Main Engine11274
Allaveurte2019-01-16Port Main Engine11250
Allaveurte2019-01-15Port Main Engine11237
Allaveurte2019-01-14Port Main Engine11235
Allaveurte2019-01-13Port Main Engine11232
Allaveurte2019-01-12Port Main Engine11226
Allaveurte2019-01-11Port Main Engine11226
Allaveurte2019-01-10Port Main Engine11222
Allaveurte2019-01-09Port Main Engine11211
Allaveurte2019-01-08Port Main Engine11199
Allaveurte2019-01-07Port Main Engine11188
Allaveurte2019-01-06Port Main Engine11182
Allaveurte2019-01-05Port Main Engine11158
Allaveurte2019-01-04Port Main Engine11134
Allaveurte2019-01-03Port Main Engine11125
Allaveurte2019-01-01Port Main Engine16
4 REPLIES 4
v-lionel-msft
Community Support
Community Support

Hi @liamcameron ,

"I'm attempting to create a table that will show the average usage of an engine over a month. "

Do you want to exclude the wrong hours and then average it over a month?

As shown in the table below, 16 is an incorrect value, so you need to exclude it and then average it, right?

ff9.PNG

But there is a question here, based on what do we judge whether this value is wrong or correct?

And is this what you want?

 

average usage of an engine = 
AVERAGEX(
    FILTER(
        Range,
        [Hours] >= 10000 && [Hours] <= 12000
    ),
    [Hours]
) 

 

ff10.PNG

 

Best regards,
Lionel Chen

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

 

Hey Lionel. 

 

So yes, the 16 there is an error, and I want it omitted. 

 

Later, I have a measure that calculates Max[hours] - Min[hours]

amitchandak
Super User
Super User

Create a new column like given below

Column = if(Range[Hours]/AVERAGEX(Range,Range[Hours])>.85 && Range[Hours]/AVERAGEX(Range,Range[Hours]) <=1.15,1,0)

 

You can change the range of valid values depeand on need. Now take Min and max by excluding 0.

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

So to do a sales analogy... pretend that is my net revenue for a year, but what it was on day 1, day 2. So it's always increasing. the [hours] column is a total. i'm trying to find what was the average change, but excluding those errors

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors