Ok, I've got a problem that is pretty convoluted, I think I'm going about it the wrong way, but it is actually the best way I can think of...with that said, here goes.
I have two tables, one with year to date totals for each store, and one with last month totals for each store. I then have a report that shows all this data by different groupings, and totals by open stores and by closed stores. Now each store in the last month totals table is obviously either open or closed...but in the year to date totals table a store can be open for January and February, but closed for March and April...and this data must go to its appropriate section, so for example store 600 will have some data in "open total" and some data in "close total". Now this is not a big deal, I worked that out...the solution was to have two records for store 600...the problem occurs when i try and join the Last Month table with the Year to Date table to bring all the data together for the report...because there are two records for store 600 in one table and only one record in the other table I get the Last Month data showing up twice (if i link by store number) or I get only the "closed" data showing up (if i link by store number and open/closed).
what i'm getting now:
store ytdRevenue lastmonthRevenue open/closed
600 2200 800 open
600 3300 800 closed
or
600 3300 800 closed
Anyway, that's the problem, my ideal solution would be to have the data as follows:
store ytdRevenue lastmonthRevenue open/closed
600 2200 0 open
600 3300 800 closed
so basically get a 0 for lastmonth where there is a record in ytd but not one in lastmonth (based on store # and open/closed)...but any other suggestion would be much appreciated. thanks.
kevin
I have two tables, one with year to date totals for each store, and one with last month totals for each store. I then have a report that shows all this data by different groupings, and totals by open stores and by closed stores. Now each store in the last month totals table is obviously either open or closed...but in the year to date totals table a store can be open for January and February, but closed for March and April...and this data must go to its appropriate section, so for example store 600 will have some data in "open total" and some data in "close total". Now this is not a big deal, I worked that out...the solution was to have two records for store 600...the problem occurs when i try and join the Last Month table with the Year to Date table to bring all the data together for the report...because there are two records for store 600 in one table and only one record in the other table I get the Last Month data showing up twice (if i link by store number) or I get only the "closed" data showing up (if i link by store number and open/closed).
what i'm getting now:
store ytdRevenue lastmonthRevenue open/closed
600 2200 800 open
600 3300 800 closed
or
600 3300 800 closed
Anyway, that's the problem, my ideal solution would be to have the data as follows:
store ytdRevenue lastmonthRevenue open/closed
600 2200 0 open
600 3300 800 closed
so basically get a 0 for lastmonth where there is a record in ytd but not one in lastmonth (based on store # and open/closed)...but any other suggestion would be much appreciated. thanks.
kevin