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
sanchar123
Helper I
Helper I

DAX for Calculating Mean Time for certain conditions

HI Team,

I have a condition where the DateTime stamp is not periodic and Pressure should be in the range of 2000< Pressure < 4000

 

I have the desired calculations explained in the attached figure. 

Raw data is with the time stamp and pressure values.

I have to calculate the Mean Time between Failures (good data duration) = MTBF

 Mean TIme  to restore Services (bad data duration)= MTTS 

 

Can you please let me putting the logic.

Thanks in advance.image.png

2 REPLIES 2
YukiK
Impactful Individual
Impactful Individual

I'm not sure if I correctly understand the requirement, but you can probably do something like the following for MTBF to work.

 

1. Pressure within range = CALCULATE(SUM(Pressure), AND(Pressure >2000, Pressure < 4000))

2. MTBF = AVERAGEX(VALUES(Date), [Pressure within range])

 

2 is assuming that you have a date column whose grain is per row per day.

 

Hope this helps!

Thanks for the reply. although i am not really getting your logic applied.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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