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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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