Forum Discussion
PowerBI Desktop
Hello lbendlin ,
This is very helpful! This algorithm is yielding correct results for the MTBF for individual Equipments when I am using the Stacked Column Chart like this:
But I am trying to get the MTBF for all the Equipments for each month- January, February, March, etc..If I put the MTBF on the Y-axis, BreakDate on the X-axis and Legend = Equipment, I get the MTBF for the individual equipments but not as a whole for all the Equipments.
If I add the MTBF for all those individual Equipments, I am getting MTBF like 150, 200 for respective months whereas I am expecting value anywhere between 10-20 days.
How do I get the MTBF for all those necessary Equipments for each respective months?
Thanks
Hello lbendlin ,
Adding to this question, I can neither write a Measure nor a Calculated Column inside of that table using Average Function for the MTBF33. Also, PowerBI also does not allow me to select SUM, AVERAGE, MIN, MAX dropdown from the MTBF33 shown in the visual above in the Y-axis.
I think applying average for the MTBF for all those individual equipments for each of the respective month will solve this problem but I don't know how to go about solving it?
Thanks
- lbendlin1 year agoSuper User
How do I get the MTBF for all those necessary Equipments for each respective months?I have no idea how this would logically even be possible.
Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.- Anonymous1 year agoNot applicable
Equipment Commissioned Date BreakDown Date A 02/01/2024 03/15/2024 B 01/01/2024 02/01/2024 C 01/15/2024 02/15/2024 A 02/01/2024 02/28/2024 B 02/20/2024 03/20/2024 C 03/01/2024 03/27/2024 Hello lbendlin ,
I have added a dataset to recalculate the MTBF for February and March 2024. I am fine with your earlier formula of
MTBF = var a = values('MergedTable'[BreakDate]) return if(HASONEVALUE(MergedTable[Equipment]),DIVIDE(maxx(a,[BreakDate])-minx(a,[BreakDate]),COUNTROWS(a)-1))
But this time, I want the MTBF for February and March of 2024 instead of individual equipments.
Can you please suggest the DAX code in consistent with the formula above?
Thank you again!
- lbendlin1 year agoSuper User
I want the MTBF for February and March of 2024I don't know what that means. Do you want the MTBF for equipments that were commissioned in these months?