Presenting Data in a Matrix: Financial Modeling Language

The Financial Modeling Language (FML) is an extension of the reporting language. It is particularly suited for use with financial data from which you can produce documents, such as balance sheets or budgets, where rows in addition to columns are interrelated. This means you can perform calculations between rows as well as columns.

The following is a sample FML request along with the asset sheet it produces. Notice that the FML commands are embedded in a standard TABLE request.

This annotated example is similar to a typical report request, except for the addition of the FML keywords. The example produces a simple asset sheet, contrasting the results of two years. The numbers refer to the explanations that follow.

TABLE FILE FINANCE
HEADING CENTER
"COMPARATIVE ASSET SHEET  </2"
SUM AMOUNT ACROSS HIGHEST YEAR
IF 'YEAR' EQ '1983' OR '1982'
1. FOR ACCOUNT
2.     1000             AS 'UTILITY PLANT'                    LABEL    UTP       OVER
2.     1010 TO 1050     AS 'LESS ACCUMULATED DEPRECIATION'    LABEL    UTPAD     OVER
3.     BAR                                                                     OVER
4. RECAP UTPNET=UTP-UTPAD; AS 'TOTAL PLANT-NET'                           OVER
           BAR                                                                   OVER
           2000 TO 3999   AS 'INVESTMENTS'                    LABEL    INV       OVER
           "CURRENT ASSETS"                                                      OVER
           4000           AS 'CASH'                           LABEL    CASH      OVER
           5000 TO 5999   AS 'ACCOUNTS RECEIVABLE-NET'        LABEL    ACR       OVER
           6000           AS 'INTEREST RECEIVABLE'            LABEL    ACI       OVER
           6500           AS 'FUEL INVENTORY'                 LABEL    FUEL      OVER
           6600           AS 'MATERIALS AND SUPPLIES'         LABEL    MAT       OVER
           6900           AS 'OTHER'                          LABEL    MISC      OVER
           BAR                                                                   OVER
        RECAP TOTCAS = CASH+ACR+ACI+FUEL+MAT+MISC; AS 'TOTAL CURRENT ASSETS'     OVER
           BAR                                                                   OVER
           7000           AS 'DEFERRED DEBITS'                LABEL    DEFOB     OVER
           BAR                                                                   OVER
        RECAP TOTAL=UTPNET+INV+TOTCAS+DEFDB; AS 'TOTAL ASSETS'                   OVER
           BAR AS '='
           FOOTING CENTER
           "</2 *** PRELIMINARY ASSET SHEET BASED ON UNAUDITED FIGURES ***"
END

Note:

  1. FOR and OVER are FML keywords that enable you to easily structure the report on a row-by-row basis.
  2. LABEL assigns a variable name to a line item for use in a RECAP calculation.
  3. BAR enables you to underline a column of numbers before performing a RECAP calculation.
  4. RECAP allows a calculated row to be inserted anywhere in the output.

Run the request. The output is:

WebFOCUS

Feedback