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
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
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
Many thanks PG - I'll raise it with SAS.
Best regards
Jim
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
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!
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.