var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Cumulative total for columns in select query
I putting together a select query and the results look like this:
Month Unredeemed Total Sales
200501 50 100
200502 200 550
200503 25 125
I would like to have two more columns to the right that are cumulative totals of the "Unredeemed" and "Total Sales" columns. It would look like this:
Month Unredeemed Total Sales Cum. Unredeemed Cum.Total Sales
200501 50 100 50 100
200502 200 550 250 650
200503 25 125 275 775
Is there an expression or function I can use to accomplish this? Thanks for your help.
Any number of ways, a couple here:
If this is for a report, it may be easier to use the Running Sum property of a textbox.
Thanks. Can you divide two running sums in a report to find a percentage? I doesn't seem to work when I try it. Thanks.
Probably depends on the specifics, but I just did a quick test and it worked fine. Post your SQL.