Hi, hope anyone can help me with this: * Let's say I have these data. DATA LIST /id 1-2 age 3 group 4. BEGIN DATA 1 11 2 21 3 31 4 11 5 21 6 11 7 21 8 10 9 20 1010 1110 1210 END DATA. VAL LAB age 1 'Young' 2 'Medium' 3 'Old'. VAL LAB group 1 'Yes' 0 'No'. DEFINE @index(col = !TOKENS(1) /basis = !TOKENS(1) /process = !DEFAULT('ALL') !TOKENS(1)) STATS TABLE CALC SUBTYPE=" Custom table" PROCESS = !process /TARGET FORMULA = !QUOTE(!CONCAT(x,!col,"/x", !basis, " * 100")) DIMENSION = COLUMNS LEVEL = -1 LOCATION = !col LABEL="Index" MODE=AFTER /FORMAT CELLFORMAT = "#,###.##" DECIMALS = 1 INVALID="". !ENDDEFINE. CTABLES /TABLE age BY group [COUNT 'N' F40, COLPCT '%' F40.1] /CATEGORIES VARIABLES = age group TOTAL = YES LABEL = 'Total' POSITION = BEFORE. @index col = 5 basis = 1. * My question: how can the /FORMAT CELLFORMAT = "#,###.##" subcommand be changed so that decimals are indicated by a comma? I tried various tricks but basically I don't understand how this format works. Any enlightenment is welcome. Thanks, Mario Mario Giesel Munich, Germany |
The pivot table formats automatically adjust to your locale, but the STATS TABLE CALC formats might not work that way. You can, however, specify the format the way you want. Write CELLFORMAT = "#.###,##" On Tue, Feb 4, 2020 at 10:06 AM Mario Giesel <[hidden email]> wrote:
|
Ah, I thought I was trying this variant as well. But you are right, this way it works well! Thanks a lot! Mario Mario Giesel Munich, Germany
Am Dienstag, 4. Februar 2020, 22:16:15 MEZ hat Jon Peck <[hidden email]> Folgendes geschrieben:
The pivot table formats automatically adjust to your locale, but the STATS TABLE CALC formats might not work that way. You can, however, specify the format the way you want. Write CELLFORMAT = "#.###,##" On Tue, Feb 4, 2020 at 10:06 AM Mario Giesel <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |