Calculations
Calculations
Calculations
Calculations Adding a Calculated Column Adding Summary Totals to a Footer (Totaling a Column) Grouped Summary Footers Summary Calculation without detail
Lesson 5 Calculations
129
ISA Consulting
ISA Consulting
Calculations
Complex and involved calculations are possible within Report Studio. This chapter will focus on the easier and more commonly used calculations. For instance, we can create a calculated column by multiplying one column with another. Grouping a column allows you to keep all the similar data together, and to add summaries for each group. Some of the summaries available are counting the number of rows, averaging the numbers in a group and totaling. GOAL: To build a report to use within this chapter. STEPS: 1. Click the New icon and select List. 2. Add Full Name and Birthdate.. 3. Save the report as Calc. 4. Run the report. Close the Report Viewer.
Lesson 5 Calculations
131
Group. Creates a calculation that is applied to grouped values. This type of calculation is applied to values after they have been aggregated.
Layout. Creates a calculation containing run-time information anywhere in the report. Use it to create dynamic layout objects, such as a customized title.
GOAL: To create a new Age column by using Birthdate. STEPS: 1. Click the Toolbox tab.
ISA Consulting
ISA Consulting
Lesson 5 Calculations
133
4. Click OK. 5. Click the Functions tab and open the Business Date/Time Functions folder. Scroll down and double-click _years_between to add it to the right.
ISA Consulting
ISA Consulting
6. Open the Common Functions folder and double-click current_date. 7. Type a comma and a space after current_date. 8. Click the Query Items tab and double-click Birthdate. Type a ) after Birthdate. 9. Click the Validate icon and make sure there are no errors.
Note: You can also type directly into the Expression Definition area.
Lesson 5 Calculations
135
ISA Consulting
ISA Consulting
1. Create a new list report with Country Description, Primary University Affiliation Description, and ID as columns. 2. Save the report as Count ID. 3. Highlight the ID column.
Lesson 5 Calculations
137
4. Click the drop down arrow to the right of the Aggregate icon
ISA Consulting
ISA Consulting
7. Run the report. 8. Click the Bottom link to go to the bottom of the report to view the footer.
9. The number of IDs for the entire report is shown in the last row in bold. Close the Report Viewer. 10. Save the report as Count ID List.
Lesson 5 Calculations
139
To remove the summary footer: 1. Click in the Summary footer at the bottom of the report. The footer is selected.
2. Press the Delete key. 3. The Summary footer and the ID count are deleted from the report.
ISA Consulting
ISA Consulting
5. In the drop down list, choose Count. 6. Because the report is grouped by Country Description, and Primary University Affiliation Description, a summary footer is added for each grouping. The last footer (labeled <Summary> will show a summary for the entire report.
Lesson 5 Calculations
141
8. Click the Page Down link and examine the groupings for Canada.
ISA Consulting
ISA Consulting
10. The report shows the number of people for each country, for each affiliation, and for the entire report. 11. Close the Report Viewer and Save the report as Group Count ID.
Lesson 5 Calculations
143
2. Group the Country Description and Primary University Affiliation Description columns. 3. Click on the ID column. In the Properties window, scroll down to Data Item.
ISA Consulting
ISA Consulting
4. Click the Aggregate Function area and then click the down arrow.
5. Choose Count.
Lesson 5 Calculations
145
6. Highlight the ID column heading. 7. In the Properties window, locate Text Source. Click on Text and then click on the ellipse button. 8. Inside the Text window, type the new column name Count ID.
ISA Consulting
ISA Consulting
11. Run the report. (Instead of showing each individual ID, Report Studio summarizes by counting the number of IDs associated with each Country and Affiliation.)
12. Close Report Viewer. 13. Delete the Primary University Affiliation Description column.
Lesson 5 Calculations
147
14. Run the report and now you will see the counts of IDs per country.
15. Close the Report Viewer. 16. Do not Save the report.
ISA Consulting