cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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!:
Mastering Power BI 2nd Edition

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!:
Mastering Power BI 2nd Edition

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors