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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
DFlynn
Frequent Visitor

calculate cycle times, get an average excluding top 15%

In a manufacturing setting I have a pick started and pick completed time/date stamps, i have subtracted them from one another to get the duration or cycle time. I am trying to build a report to get the average which i did using a measure however my data is skewed due to some outlier times and i would like to exclude the top 15% without removing the data. I know i can do it with if functions within excel but i am racking my brain with DAX.

DFlynn_0-1680192791054.png

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@DFlynn Try using AVERAGX with a FILTER function. For a more complex approach to this, here is an equivalent of TRIMMEAN in Excel: TRIMMEAN - Microsoft Power BI Community


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

@DFlynn Try using AVERAGX with a FILTER function. For a more complex approach to this, here is an equivalent of TRIMMEAN in Excel: TRIMMEAN - Microsoft Power BI Community


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

That did work but did not quite give me the result i wanted, I ended up using power query to duplicate the start and end times columns and then turning those into decimal value. Take that and split the column at the delimiter, seperating the time and the date sets. Then i can subtract them accurately because DAX is odd with times over 24hours. Did the averages from that and converted it all back over. Thank you for the assistance.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors