Define Statistics

  Up   Back  Next  Example

SWISSLOG includes several predefined statistics that are stored in the SWLSTAT.MDB database. These statistics are called Standard Statistics. The SWLSTAT.MDB contains the statistic definitions and the information tables. You cannot modify this DB. Whenever an update of information tables or statistics is available, the DB will be replaced.

If you need a statistic that is not predefined you can create a Private Statistic. Contrary to Standard Statistics these Private Statistics are stored in your log database.

If you want to modify a Standard Statistic, you must first export it and then import it as Private Statistic. Then you should change the name and deactivate the corresponding Standard Statistic.

Because only a limited number of fields are available to store statistic information, field conflicts can exist. Field conflicts are detected at run time. If you define Private Statistics you will get an error message when entering a QSO. You then have to deactivate one of the conflicting Statistics, use another field, Define the Statistic as Sub Statistic if it usses the same Key as an other Statistic  or use a variable statistic. There is a function provided to reassign a new field for a statistic see resolve statistic conflicts.

Import a Statistic Definition

The SWISSLOG statistic definition files have use the following file extension .INS and are usually located in the Info directory. However, it is also possible to obtain statistic definitions from other sources, such as the internet. In that case, you must remember where you stored them.

To import a statistic select File Statistic Import / Export Import Statistic from the main menu. 

The following dialog is displayed:

Please see Predefined Statistics for an overview about the statistics, the fields used, and the selection criteria.

Create a Statistic Definition

Defining a statistics is a task that requires some experience and needs some planning. It will therefore be explained step by step using an example. We will define a DOK statistic. DOK is the abbreviation for Local Amateur Group (Section) in Germany. Note: DOK is already defined as standard Statistic, it is only being used here to illustrate how statistics are defined.

Concept used for Statistics

Before we start with the description of the Statistic Definition one fundamental concept of the SWISSLOG statistic needs to be explained. The following briefly explains how SWISSLOG selects the QSO's which are included in a statistic.

QSO's included in the statistic

Most of the Statistic Definitions contain a SQL Query that selects the QSO's for the statistic. Note: Not all statistic definitions contain a SQL Query a SQL Query is only needed if, not all QSO's count for a statistic; as an example the DXCC statistic does not have an SQL query. If the statistic does include a SQL Query, you can define exactly which QSO's count for the statistic. The Query is then used to select the QSO's that are used to calculate the statistic. This concept makes it possible to use the same field for several different statistics. A very good example of a multiple use field is the Region field. Regions are unique to countries. Therefore, we can put the region information for all countries into the same field and still have different statistics for each country. In the Query, you can define the QSO's for a specific DXCC that count for the statistic. For example you would specify:

DXCC = 'DL' for DOK Statistic

DXCC = 'HB9' for the H26 Statistic

DXCC = 'F' for the DDFM Statistic

DXCC = DXCC IN ('EA', 'EA6', 'EA8', 'EA9') for the TPEA Statistic

The same Query is also used to determine which statistics a QSO qualifies for when you enter new QSO's. This makes it possible to:

The SQL Query can be defined with the help of the report generator so, you don't need to know how to program using SQL.

Select the Field which contains the Statistic Information

First you need to define the field that contains the data the statistic is based on. See Fields for Award Information for information on how to select a field.

We will put the DOK into the field P_Sub_Region, which is in the PQTH Table. This corresponds to the entry field Sub_Region on the QTH page of the Edit QSO window. 

Create an Information Table for the Statistic

The following step is optional:

Information Tables (also referred to as Info-Table) contain detailed information about the statistic items. For example the IOTA Info-Table contains the full name for each island abbreviation. If you provide an Info-table with the detailed information, it can be displayed in the statistic views and reports, and you can look up the information when entering QSO's.

For this example we'll assume we have already created a DOK Info-Table. See How to create Information-Tables for detailed information.

Create the DOK Statistic

From the main menu select Edit Define Statistics. This will open the Create/Change Statistic Definitions view.

This completes the definition of the DOK statistic.

Press the save button and close the statistic definition dialog.

Create Check-SQL

To create the Check-SQL press the button and

Variable Statistic

Variable statistics allow you to create statistics with fields that do not exist in the QSO! Actually each variable statistic represents a new QSO field (a 32 character string).

For each variable statistic, a table is created which contains one value field and a reference to the QSO it belongs to (QSONr.).

Use this type of statistic only if there is no way to use either the Diploma, Spec or Sub-region fields.

Top   Up    Back  Next

Copyright 2004 SWISSLOG
Last modified: 20 ago. 2018