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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1375 views
  • 2 likes
  • 2 in conversation