Expand|Select|Wrap|Line Numbers
- AchID_pk, EffectiveDate
- 3385 4/1/2016
- 3394 4/7/2016
- 23 4/14/2016
- 36 4/18/2016
- 43 4/21/2016
- 61 4/28/2016
So here is what I have tried with the results (The YearMonth and EffectiveDateFormat fields format the date to be yyyymm so that I can split the count down to a specific month of a year):
Join:
Expand|Select|Wrap|Line Numbers
- ON (Main.CustId_pk = qryFileCount.CustId_fk)
- AND (Main.YearMonth = qryFileCount.EffectiveDateFormat)
- AND ((Main.AchFileId_pk >= qryFileCount.AchFileId_pk)
- AND (Main.EffectiveDate >= qryFileCount.EffectiveDate))
Expand|Select|Wrap|Line Numbers
- AchID_pk, EffectiveDate, FileCount
- 3385 4/1/2016 1
- 3394 4/7/2016 2
- 23 4/14/2016 1
- 36 4/18/2016 2
- 43 4/21/2016 3
- 61 4/28/2016 4
Join:
Expand|Select|Wrap|Line Numbers
- ON (Main.CustId_pk = qryFileCount.CustId_fk)
- AND (Main.YearMonth = qryFileCount.EffectiveDateFormat)
- AND ((Main.AchFileId_pk >= qryFileCount.AchFileId_pk)
- OR (Main.EffectiveDate >= qryFileCount.EffectiveDate))
Expand|Select|Wrap|Line Numbers
- AchID_pk, EffectiveDate, FileCount
- 3385 4/1/2016 5
- 3394 4/7/2016 6
- 23 4/14/2016 3
- 36 4/18/2016 4
- 43 4/21/2016 5
- 61 4/28/2016 6
I tried making a calculated field converting the EffectiveDate field to a long and then concatenating the PK value to the end
Expand|Select|Wrap|Line Numbers
- CLng(EffectiveDate) & AchId_pk