Big picture: I want to get a year to date field for every day
I have MTD for each month, so in Jan MTD and YTD are equal
but from then on YTD= YTD of previous month times MTD
So with that information
I tried
SELECT A.ladder_date, A.gMTDPER, (select B.gMTDPER from gMTDSummary B WHERE
DatePart("m",[A.LADDER_DATE])=(DatePart("m",[B.ladder_date])-1))
FROM dailySUMMARY AS A;
to see the previous MTD number. But the last column returned is blank
The query gMTDSummary only has monthly information. In reality I all the same info in the table dailySummary
I have MTD for each month, so in Jan MTD and YTD are equal
but from then on YTD= YTD of previous month times MTD
So with that information
I tried
SELECT A.ladder_date, A.gMTDPER, (select B.gMTDPER from gMTDSummary B WHERE
DatePart("m",[A.LADDER_DATE])=(DatePart("m",[B.ladder_date])-1))
FROM dailySUMMARY AS A;
to see the previous MTD number. But the last column returned is blank
The query gMTDSummary only has monthly information. In reality I all the same info in the table dailySummary