3 Replies Latest reply on May 24, 2012 10:43 AM by Reginald Green

# Reverse Running Total Calculation

Hi Everyone,

I was wondering whether it's possible to do a "Reverse Running Total Calculation"?

Basically what I have is a tabular report consisting of 5 columns; the first column is a date, which is then followed by 2 daily total columns and 2 running total columns - one for each of the daily total columns.

Format of the report is as follows:

Date_Column          Daily_Total_Col_1          Running_Total_1          Daily_Total_Col_2          Running_Total_2

Problem:

I want the data to be listed in descending data order (the easy part). The really tricky part is that I want the table calculations to be listed in descending order; therefore the first row will show the grand total for the table, the 2nd row will show the grand total minus the value in the 1st row, the 3rd will show the grand total minus the 1st + 2nd rows, etc.

R

• ###### 1. Re: Reverse Running Total Calculation

Can you provide a tbwx along with the expected result from the data in it?

• ###### 2. Re: Reverse Running Total Calculation

You need to use the Advanced option on the Compute Using to set the order to be used by the table calculation to be the opposite of the order used in the view (by default it will be based on the order of the view).

Like this:

Coffee Sales example attached.

1 of 1 people found this helpful
• ###### 3. Re: Reverse Running Total Calculation

Hi Alex and Richard,

Thanks for your input, however I answered my own question soon after I posted it.

I sorted the data by date, then created the following calculated field, which I placed next to my daily total column

TOTAL(SUM([Times Launched])) - RUNNING_SUM(SUM([Times Launched]))

As can be seen, the first line shows the cumulative total/grand total, then subsequent lines get closer to zero. Below is a screenshot.

Thanks again

Reginald Green