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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.