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.
Hi all,
I want to calculate the Mean time between failures for some machines (average number of days between one failure and the next one for each machine)
I have one column with all the machine numbers and one column with the notification dates.
DATEDIFF doesnt work because i am comparing data in the same column and not in different ones.
Anyone has a suggestion on how to solve this? I thought about pivoting/unpivoting but i cant seem to get it right.
I found in this forum a solution, but it applies only in cases i have two dates
Date Difference = CALCULATE(DATEDIFF(MIN(Table1[Max Date]), MAX(Table1[Max Date]), DAY), ALLEXCEPT(Table1, Table1[Name]))
Ideas?
Thank you in advance,
Alessandra
Solved! Go to Solution.
@alevandenes - I have an article on MTBF - See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/3395....
The basic pattern is:
Column =
VAR __Current = [Value]
VAR __PreviousDate = MAXX(FILTER('Table','Table'[Date] < EARLIER('Table'[Date])),[Date])
VAR __Previous = MAXX(FILTER('Table',[Date]=__PreviousDate),[Value])
RETURN
__Current - __Previous
@alevandenes - I have an article on MTBF - See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/3395....
The basic pattern is:
Column =
VAR __Current = [Value]
VAR __PreviousDate = MAXX(FILTER('Table','Table'[Date] < EARLIER('Table'[Date])),[Date])
VAR __Previous = MAXX(FILTER('Table',[Date]=__PreviousDate),[Value])
RETURN
__Current - __Previous
I was wondering if you had a solution also to exclude non-working hours from the calculation of Repair Hours?
Your article helped incredibly.
Kind regards,
Alessandra
Wow thank you very much!! The article is great
@alevandenes , I think You need to try like
last Actual start date = maxx(filter(Table, [Equipment] = earlier([Equipment]) && [Actual start date] <earlier([Actual start date])),[Actual start date])
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
96 | |
75 | |
63 | |
62 |
User | Count |
---|---|
137 | |
105 | |
104 | |
80 | |
63 |