BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Jan1204
Calcite | Level 5

I use Enterprise Guide to create some graphical output, in Euro-currency.

Standard i used 'EUROXw.d. format, but since a while the Euro-sign is not the "real", but no more than "E". I looked on the internet and found a solution: "NLMNLEURw.d". So far so good.

Now, i want to use this format in Enterprise Guide and that's not working very good.

I want to create a Summary - Table. I can choose between "Summary Tables task" and "Summary Tables Wizard". End I want to use both, to show the difference in creating and handling.

 

First the SummaryTables Task: in the summary-tables window you can add a format to the Sum or Total measure. Select NLMNLEURw.d, standard with Width =15 and Decimal = 2. I change this in 12 and 0 (zero). Then Run the task. Result: currency with 2 decimals! Back to the task: format in 12.2. This is not what i want!

When I change the format to DOLLARX (width=12, decimal=0) then the result looks OK: NO decimals.

 

Secondly the Summary Tables Wizard: this wizard contains 6 steps; in the second step there is an input-field with a browse-button to search for the right format of just type it or a combination. First select with the Browse-button the format with Width=12 and Decimals=0. In the input-field you will see "NLMNLEUR12." N.B. This is not correct, the decimal-part needs a value: add "0" to the format. Run and look at the result: just the way it should be!

 

The question is, why can't the Summary Tables Task do the right thing?

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

It seems to be some type bug with the format.

data _null_;
  input x @@ ;
  length format value $40 ;
  put / x= ;
  do format='F8.','F8.0','COMMA8.','COMMA8.0','NLMNLEUR8.','NLMNLEUR8.0' ;
    value = putn(x,format);
    put format= value= ;
  end;
cards ;
100 100.12 
;
x=100
format=F8. value=100
format=F8.0 value=100
format=COMMA8. value=100
format=COMMA8.0 value=100
format=NLMNLEUR8. value=€100.00
format=NLMNLEUR8.0 value=€100

x=100.12
format=F8. value=100
format=F8.0 value=100
format=COMMA8. value=100
format=COMMA8.0 value=100
format=NLMNLEUR8. value=€100.12
format=NLMNLEUR8.0 value=€100

You should open a ticket with SAS support.

 

As a work around use some other format, like COMMA12. instead and add something to the column headers or a footnote to indicate that the units are euros.

 

View solution in original post

6 REPLIES 6
Tom
Super User Tom
Super User

I don't understand what the question is.

Are you suggesting that there is a difference between specifying a format of  

NLMNLEUR12.

and one specified like this instead?

NLMNLEUR12.0

If so what difference is there? Does it cause some error? Change the way the data appears in any way?

 

Jan1204
Calcite | Level 5

Hello Tom,

 

Sure, I am suggesting there is a difference.

Read my first posting.

 

Tom
Super User Tom
Super User

@Jan1204 wrote:

Hello Tom,

 

Sure, I am suggesting there is a difference.

Read my first posting.

 


If it was clear from the original posting I would not have asked for clarification.

Please provide input data (in the form of a data step so we can re-create). Code you ran. Log. And show where in the output you see any difference.

Jan1204
Calcite | Level 5

Hello Tom,

 

I will describe a new example.

 

I use, as example, the following dataset: SASHELP.CLASS.
From this dataset I want the next report:
  Total-Weight and Total-Height summed by Age, in Euro's with no decimals. The format I will use is NLMNLEUR12.0

To create the reports I use Enterprise Guide with 2 tasks:
- Summary Tables Wizard...
- Summary Tables...

 

First the Summary Tables Wizard task; see attachment "Summary Tables Wizard Class-table definition".

After RUN in EG shows as result the following attachment: "Summary Tables Wizard Class-table Result."

The LOG from this proces: "Proc Tabulate Data=SASHELP.CLASS FORMAT=NLMNLEUR12.0; VAR HEIGHT WEIGHT; CLASS Age / ORDER=UNFORMATTED MISSING; TABLE /* ROW statement */ Age  all = 'Total'  ,  /* COLUMN Statement */  (Height  *  Sum={LABEL="SUM"}  Weight * Sum={LABEL="Sum"}  )  ;  RUN;

 

Second: the Summary Tables task; first the attachment which shows the Selected Format "NLMNLEUR12.0": "Summary Tables task format"; running this task results in the following attachment "Summary Tables task result", in which you see decimal-values (that is not what we want!); back to the task-window and we see that the format has changed into NLMNLEUR12.2., see attachment "Summary Tables task format after run".

The LOG from this proces: "Proc Tabulate Data=SASHELP.CLASS; VAR HEIGHT WEIGHT; CLASS Age / ORDER=UNFORMATTED MISSING; TABLE /* ROW Dimension */  Age *  Sum*F=NLMNLEUR12.   Sum*F=NLMNLEUR12.  /* Column Dimension */  Height  Weight  ;   ;  RUN;  Remark : this is strange, in the Proc Tabulate the format has NO decimals (12.) and in the task it shows 2 decimals (12.2)

 

I hope it's clear what I wrote and you have a sulution for it.

 

With my sincere regards, Jan Sijm

 

 

 

Tom
Super User Tom
Super User

It seems to be some type bug with the format.

data _null_;
  input x @@ ;
  length format value $40 ;
  put / x= ;
  do format='F8.','F8.0','COMMA8.','COMMA8.0','NLMNLEUR8.','NLMNLEUR8.0' ;
    value = putn(x,format);
    put format= value= ;
  end;
cards ;
100 100.12 
;
x=100
format=F8. value=100
format=F8.0 value=100
format=COMMA8. value=100
format=COMMA8.0 value=100
format=NLMNLEUR8. value=€100.00
format=NLMNLEUR8.0 value=€100

x=100.12
format=F8. value=100
format=F8.0 value=100
format=COMMA8. value=100
format=COMMA8.0 value=100
format=NLMNLEUR8. value=€100.12
format=NLMNLEUR8.0 value=€100

You should open a ticket with SAS support.

 

As a work around use some other format, like COMMA12. instead and add something to the column headers or a footnote to indicate that the units are euros.

 

Jan1204
Calcite | Level 5

Thanks for the support.

sas-innovate-2024.png

Today is the last day to save with the early bird rate! Register today for just $695 - $100 off the standard rate.

 

Plus, pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 3939 views
  • 0 likes
  • 2 in conversation