In this tutorial, you will design a report showing the sales figures for each Sales Group grouped by Sales Person and you will add user defined calculated fields.
(Shift+Up), so that SalesPersonName is underneath SalesPersonCode as shown below.When you add Calculated fields, other fields required for the calculation are also added, but they have their Visible column unselected, meaning they won’t print on your report.
Some fields are added twice, but with different Ranges to return This Year or Last Year Sales figures. Display labels are changed to match.
Add the following selections:
Source |
Field Name |
Display Label |
Range |
AR Sales Groups |
Analysis Name |
Sales|Group|Name |
|
Calculated |
Sales Value |
YTD|Sales |
YTDThis |
Calculated |
Gross Profit |
YTD|Profit |
YTDThis |
Calculated |
Sales Value |
Last YTD|Sales |
YTDLast |
Calculated |
Gross Profit |
Last YTD|Profit |
YTDLast |
Note: You may notice that sometimes when you move off a Calculated field line, a Summary field underneath is removed. This happens when the Summary Field and Range are already available on the report.
Add fields as below:
Source |
Field |
Display Label |
Range |
|
Calculated |
<Custom> |
% Change|Sales |
|
|
Calculated |
<Custom> |
% Change|Profit |
|
|
(F2).The Analysis Expression window opens, and here you can build your expressions based on the fields you use in the report. You can build expressions using the menu drop downs, but for this exercise, copy and paste this code in:Percent(Summary_ExclusiveAmount_YTDThis - Summary_ExclusiveAmount_YTDLast,Summary_ExclusiveAmount_YTDLast)
(F9).(F2). Copy and paste this code into the Analysis Expression Window:Percent(Sum(Summary_ExclusiveAmount_YTDThis - Summary_ExclusiveAmount_YTDLast),Sum(Summary_ExclusiveAmount_YTDLast))
(F9).(F2). For this exercise copy and paste this code in:Percent((Summary_ExclusiveAmount_YTDThis - Summary_ExclusiveCost_YTDThis) - (Summary_ExclusiveAmount_YTDLast - Summary_ExclusiveCost_YTDLast),(Summary_ExclusiveAmount_YTDThis - Summary_ExclusiveCost_YTDThis))
(F9).(F2). For this exercise copy and paste this code in:Percent(Sum((Summary_ExclusiveAmount_YTDThis - Summary_ExclusiveCost_YTDThis) - (Summary_ExclusiveAmount_YTDLast - Summary_ExclusiveCost_YTDLast)),Sum(Summary_ExclusiveAmount_YTDThis - Summary_ExclusiveCost_YTDThis))
(F9).(Alt+R) and run the report to the Screen to view it. You can optionally save your report at this time.