PatchesPete
Technical User
I have a table that contains 15 months worth of data and is added to every Tuesday, making the AsOfDate always a Tuesday. I do a rolling 12 month history and use the formula below to select the months I need:
{MyTable.AsOfDate} in [dateserial(year(currentdate),month(currentdate)-12,1) to dateserial(year(currentdate),month(currentdate),1)]
It has now been requested that I pull only records from the last Tuesday of each month (rather than every Tuesday in the month) so the above formula no longer works. I need to check the AsOfDate to see if it is the last Tuesday of the month and then pull only the last 12 months of last Tuesdays of the month.
Any suggestions on how this can be done? Thanks for any assistance you can give.
{MyTable.AsOfDate} in [dateserial(year(currentdate),month(currentdate)-12,1) to dateserial(year(currentdate),month(currentdate),1)]
It has now been requested that I pull only records from the last Tuesday of each month (rather than every Tuesday in the month) so the above formula no longer works. I need to check the AsOfDate to see if it is the last Tuesday of the month and then pull only the last 12 months of last Tuesdays of the month.
Any suggestions on how this can be done? Thanks for any assistance you can give.