Got a query problem...I have a table with Revenue data for the past year. I need to create a query (that's my first problem, it has to be a query) that basically lists all the stores and revenue, and then I need to calculate what percent of the monthly revenue that day's revenue is (so basically say on the 5th the revenue is $100, and the total month revenue is $1,000, then the 5th is 10%...easy enough).
The problem is I need to calculate the month total (obviously) before I get the percent...and the way I came up with to do this was to use Dsum...this works fine but takes too long since it must recalculate the sum for every record. I only run this query for a specific month, so the Dsum result will be the same for every record...is there any way to somehow store the total first and then have each record dividing a number instead of a Dsum? I could just create another query and pull the number from there, but I'd like to avoid that if at all possible. Anyway, thanks for the help.
Kevin
The problem is I need to calculate the month total (obviously) before I get the percent...and the way I came up with to do this was to use Dsum...this works fine but takes too long since it must recalculate the sum for every record. I only run this query for a specific month, so the Dsum result will be the same for every record...is there any way to somehow store the total first and then have each record dividing a number instead of a Dsum? I could just create another query and pull the number from there, but I'd like to avoid that if at all possible. Anyway, thanks for the help.
Kevin