Cognos: How to Create a Running Total


This document is to show an example of using Running Total function in Cognos.

Steps to Take

1. The data fields are shown in the list below.

Screenshot: Insertable objects data fields for query

2. Click on Report and Select Query 1.

Screenshot: Selecting Query 1

3. Click on Tools and drag Query Calculation to the Data Items pane.

Screenshot: Query Calculation

4. Change the Name to ‘Running Total for Student Count Per Term’

                     running-total([Student Count] for [Term Code])

Screenshot: Expression Definition in Data Item Expression

5. You will see the following as shown below.

Screenshot: Data Item called Running Total for Student Count per Term Code

6. Click on Report and Select Page1.

Screenshot: Running report


7. Select ‘Running Total for Student Count Per Term Code’ data field and drag it to the list.

Screenshot: Running the query

Screenshot: dragging item to the data list

8. Run the report in HTML.

Screenshot: Running report in HTML

9. Report Output with Running Total. Expected Running Total Output is 2+1=3 and 3+8=11, etc

Screenshot: report output

If you have further questions, please submit a ticket.