Format Display Options for Abbreviating Numeric Values

Numeric values can be displayed in abbreviated form in terms of thousands, millions, billions, or trillions, using the format options k, m, b, t, and a.

Note:

Example: Using Display Options for Abbreviating Numeric Values

The following request computes numeric fields that use the display options k, m, b, t, and a.

TABLE FILE WF_RETAIL_LITE
SUM COGS_US
COMPUTE
COGS_K/I10k = COGS_US;
COGS_M/D20.2m = COGS_US *2000;
COGS_B/D20.3b = COGS_US *300000;
COGS_T/D20.2t = COGS_US *400000000;
COGS_A/D20.1a = IF COGS_US LT 100000 THEN COGS_US
                ELSE IF COGS_US LT 200000 THEN COGS_US *2000
                ELSE IF COGS_US LT 500000 THEN COGS_US *300000
                ELSE COGS_US *400000000;
BY BRAND
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
GRID=OFF,$
ENDSTYLE
END

The output is shown in the following image. COGS_K has format I, which displays with no decimal places. COGS_M, COGS_B, and COGS_T have format D20.2, which displays with two decimal places. COGS_A has format D20.1, which displays with one decimal place.

WebFOCUS

Feedback