MTBF Analysis in Access query

Tcurtis

Board Regular
Joined
Aug 15, 2009
Messages
149
I am trying to determine the amount of days between two dates on a matching serial number. My data has serial numbers that were seen in the past and I am only using the same serial number if it appears twice. I want to know the amount of days in between the date fields we saw these last. The dates are on different line entries in order by serial number and oldest to newest date.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Remove the second word "from". Then try again. If it doesn't work post back but do try to fix the syntax errors yourself so you don't have to wait for me.
 
Upvote 0
With a little modification this is working. I am having issues when there are more than two lines for each barcode and I think that I have some data that is incorrect. Here is the sql I am using now.
I think I will need to do some scrubbing before determining the MTBF. I really appreciate the help with this.

SELECT DISTINCT t1.BarCode, DateDiff("d",[t1].[Date_Warranty],[t2].[Date_Ent]) AS DateDifference
FROM tbl_MTBF_Multiple_Entries AS t1 INNER JOIN tbl_MTBF_Multiple_Entries AS t2 ON t1.BarCode = t2.BarCode
WHERE (((t1.RA_Num)<>[t2].[RA_Num]) AND ((t2.Date_Ent)>=[t1].[Date_Warranty]));
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top