Hello all. Long time reader, first time poster :)
I'm creating a repot that shows "the last two weeks of data the next 6 weeks of data, week over week".
So, I have a calculated field called "Week number" as the column header in a crosstab and then in the criteria for that field I put:
DateDiff("ww",# 12/22/2007#,Now(),0,# 12/22/2007#)-2
DateDiff("ww",# 12/22/2007#,Now(),0,# 12/22/2007#)-1
DateDiff("ww",# 12/22/2007#,Now(),0,# 12/22/2007#)
DateDiff("ww",# 12/22/2007#,Now(),0,# 12/22/2007#)+1
DateDiff("ww",# 12/22/2007#,Now(),0,# 12/22/2007#)+2
DateDiff("ww",# 12/22/2007#,Now(),0,# 12/22/2007#)+3
DateDiff("ww",# 12/22/2007#,Now(),0,# 12/22/2007#)+4
DateDiff("ww",# 12/22/2007#,Now(),0,# 12/22/2007#)+5
(the financial year starts on 12/22/07)
So it shows up perfectly. Here's where it gets hairy.
I also have another crosstab query that is exactly the same, but for another set of data (Lets call them Dataset A and Dataset B).
THEN, I have a third query that uses a junction table to pull the two crosstabs together so that my final result has columsn that look like this:
Name, , Etc.....Week1A, Week 1B, Week 2A, Week 2B, etc
This whole process worked fine for showing all 52 weeks. When I throw the criteria expressions on the column header fields in the crosstabs it creates a situation where the Column header names are different every week. This poses a problem because my joins on the juntion table query break when the column header names change. See my dilemma? This will also pose a problem when I go to make a report, because I wont know the names of the columns.
Any suggestions?
Thanks,
Henry
I'm creating a repot that shows "the last two weeks of data the next 6 weeks of data, week over week".
So, I have a calculated field called "Week number" as the column header in a crosstab and then in the criteria for that field I put:
DateDiff("ww",# 12/22/2007#,Now(),0,# 12/22/2007#)-2
DateDiff("ww",# 12/22/2007#,Now(),0,# 12/22/2007#)-1
DateDiff("ww",# 12/22/2007#,Now(),0,# 12/22/2007#)
DateDiff("ww",# 12/22/2007#,Now(),0,# 12/22/2007#)+1
DateDiff("ww",# 12/22/2007#,Now(),0,# 12/22/2007#)+2
DateDiff("ww",# 12/22/2007#,Now(),0,# 12/22/2007#)+3
DateDiff("ww",# 12/22/2007#,Now(),0,# 12/22/2007#)+4
DateDiff("ww",# 12/22/2007#,Now(),0,# 12/22/2007#)+5
(the financial year starts on 12/22/07)
So it shows up perfectly. Here's where it gets hairy.
I also have another crosstab query that is exactly the same, but for another set of data (Lets call them Dataset A and Dataset B).
THEN, I have a third query that uses a junction table to pull the two crosstabs together so that my final result has columsn that look like this:
Name, , Etc.....Week1A, Week 1B, Week 2A, Week 2B, etc
This whole process worked fine for showing all 52 weeks. When I throw the criteria expressions on the column header fields in the crosstabs it creates a situation where the Column header names are different every week. This poses a problem because my joins on the juntion table query break when the column header names change. See my dilemma? This will also pose a problem when I go to make a report, because I wont know the names of the columns.
Any suggestions?
Thanks,
Henry
Comment