Previous Topic

Next Topic

Book Contents

Book Index

SA Tutorial: Sales Person by Sales Group This Year & Last Year

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.

  1. Go to Navigator > Reports > Sales Analysis > Analysis Report Designer.
  2. On the Definition tab, leave the Analysis Type set to Invoices.
  3. In the Analyse grid, select AR Sales Persons, and select AR Sales Groups. This will report on AR Sales Persons as the top level, followed by AR Sales Groups.
  4. In the Analysis Range panel, leave the Analysis set to Period.
  5. Click the beside As At Period so that appears. This means the Period selection will be available when the report is run.
  6. On the Fields tab, change the Display Label for AR Sales Group AnalysisCode to Sales|Group.
  7. Select the following field:
  1. Click Move record up (Shift+Up), so that SalesPersonName is underneath SalesPersonCode as shown below.
  2. To make the report easier to read at the top level, clear the Display Label for Sales Person Code and change the Display Label for Sales Person Name to a dash -, to show the SalesPersonCode followed by a dash -, then the SalesPersonName at the top level.
  3. Select extra fields for the report. Choose from AR Sales Persons fields, AR Sales Groups fields, Summary fields, and Calculated fields which give access to fields like Gross Profit and Gross Margin as well as the ability to add your own calculations.

    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

  4. You can add Calculated fields to calculate % Change in Sales and % Change in Profit.

    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

     

  5. Add Expressions to calculate the new fields. For the % Change|Sales line, in the Expression field click CodeEdit Open Code Editor (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)

  6. Click Save (F9).
  7. For the % Change|Sales line, in the Total Expression field click CodeEdit Open Code Editor (F2). Copy and paste this code into the Analysis Expression Window:

    Percent(Sum(Summary_ExclusiveAmount_YTDThis - Summary_ExclusiveAmount_YTDLast),Sum(Summary_ExclusiveAmount_YTDLast))

  8. Then click Save (F9).
  9. For the % Change|Sales line, set the Format to Percent 1. This will show as a Percent with one decimal place.
  10. For the % Change|Profit line, in the Expression Field click CodeEdit Open Code Editor (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))

  11. Click Save (F9).
  12. For the % Change|Profit line, in the Total Expression Field click CodeEdit Open Code Editor (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))

  13. Click Save (F9).
  14. For the % Change|Profit line, set the Format field to Percent 1.
  15. On the Output Selections tab, enter a Report Title to be displayed on the report, such as Sales Person by Sales Group This Year & Last Year. You can select to Hide Filters and Hide Selection if you don’t want them included at the top of your report.
  16. On the Document Selections tab, in the Header panel, click beside Sales Person so that appears. This means the Sales Person selections and filter will be available when the report is run.
  17. Click Run (Alt+R) and run the report to the Screen to view it. You can optionally save your report at this time.