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

Hi all,

 

I am part way through putting together a natty little horizontal bar chart that shows currency values in the segments and as a total for each bar:

 

* Horizintal bar chart showing product by market sector;
title 'Sales Activity by Market Sector';
proc sgplot data=activity_market_summary;
    hbar Activity_Group / response=total_revenue group=Market displaybaseline=auto barwidth=0.6 
            seglabel seglabelformat=NLMNLGBP10.0 datalabel dataskin=pressed;
    yaxis display=(noline noticks nolabel);
    xaxis display=(noline noticks nolabel) grid;
    format total_revenue NLMNLGBP10.0;
    keylegend / location=outside position=top fillheight=10 fillaspect=2 ;
run;

The segments are displaying as I would expect, as whole GBP values only. The datalabel values (bar totals) however, are displaying the decimal part (£XXXX.00) in every case.

 

The head scratcher is that, if I change the format of total_revenue to NLMNLGBP10.1 it displays as expected, to one decimal place. The moment I switch back to NLMNLGBP10.0 the two decimals come back!

 

SAS9.4 M6

 

Thanks

 

Jim

1 ACCEPTED SOLUTION

Accepted Solutions
Jim_Ogilvie
Obsidian | Level 7

Update form SAS:

 

This issue has been passed on to SAS R&D for fixing in a future release.

 

In the meanwhile, they provided this work around which has fixed my issues:

 

Use the following format (instead of NLMNLGBP10.0):

 

NLMNY10.0

 

 

Happy SAS'ing

View solution in original post

3 REPLIES 3
PGStats
Opal | Level 21

Looks like a bug

 

1) make sure that the graphs you are looking at are not old versions

2) if the behaviour is confirmed, open a tract with SAS Technical Support

 

https://support.sas.com/en/technical-support/contact-sas.html 

PG
Jim_Ogilvie
Obsidian | Level 7

Many thanks PG - I'll raise it with SAS.

 

Best regards

 

Jim

Jim_Ogilvie
Obsidian | Level 7

Update form SAS:

 

This issue has been passed on to SAS R&D for fixing in a future release.

 

In the meanwhile, they provided this work around which has fixed my issues:

 

Use the following format (instead of NLMNLGBP10.0):

 

NLMNY10.0

 

 

Happy SAS'ing

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 3 replies
  • 847 views
  • 2 likes
  • 2 in conversation