Satish . Posted September 8, 2021 Share Posted September 8, 2021 Lets say the percentage on a piechart slice is 57.45. We would like display it as 58%. Tried Rounding off and NumberFormat related options but getting 57 only. Below is the number format that is used on the chart. numberformat: [>0]#,#%;[=0]0,0 WebFOCUS version: 8207.23 Link to comment Share on other sites More sharing options...
Martin Yergeau Posted September 8, 2021 Share Posted September 8, 2021 In fact, 57.45 rounded to a whole number is 57 and not 58 If you want to round it to 58 I suggest that you first round it to 57.5 (where one decimal is kept) and then round it again to 58 without any decimal You may need to use a HOLD file to do that Link to comment Share on other sites More sharing options...
Satish . Posted September 8, 2021 Author Share Posted September 8, 2021 Hi MartinY, I tried that option but 57.5 is getting rounded off to 57 not 58. Thanks, Satish Link to comment Share on other sites More sharing options...
Martin Yergeau Posted September 8, 2021 Share Posted September 8, 2021 DEFINE FILE CAR VAL1 /P6.2 = 57.45; VAL2 /P6.1 = VAL1; VAL3 /P6 = VAL2; END TABLE FILE CAR PRINT VAL1 VAL2 VAL3 BY COUNTRY NOPRINT WHERE READLIMIT EQ 1; ON TABLE SET PAGE-NUM NOLEAD END Link to comment Share on other sites More sharing options...
Satish . Posted September 8, 2021 Author Share Posted September 8, 2021 Thanks MartinY. It worked. I used VAL/D12.2 earlier and it didnt work as expected . Packed Decimal is working fine. Thanks for the suggestion. Best Regards, Satish Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now