Focal Point
[SOLVED]Percentage to decimal

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9547027976

December 10, 2015, 10:41 AM
NickSmith
[SOLVED]Percentage to decimal
I am trying to create a percentage toggle where my percentage is to be set as a decimal. I am having problems converting my percent as integer. I created an example through car.

SUM PCT.CAR.BODY.SALES/F6.2% WITHIN BODYTYPE
BY CAR.BODY.BODYTYPE
BY CAR.CARREC.MODEL
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2
ON GRAPH SET LOOKGRAPH HBAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
END

I'm trying to figure out the percentage for each individual slice as it meets a business requirement. Any suggestions on what to do? I tried formatting sale as a float and a decimal and didn't have any luck. Thoughts?

This message has been edited. Last edited by: <Emily McAllister>,


WebFOCUS 8
Windows, All Outputs
December 10, 2015, 12:16 PM
GavinL
Your confusing me, by posting chart code, looking for a percentage, which I would think is a report.

TABLE FILE CAR
SUM PCT.CAR.BODY.SALES/D6% WITHIN BODYTYPE
BY CAR.BODY.BODYTYPE
BY CAR.CARREC.MODEL
END




- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
December 10, 2015, 03:48 PM
GamP
What you're actually doing by redefining the format of the field is introducing a new field.
You'd better put that redefine in a define and use the defined field without any reformatting.
That way you're always sure of what GRAPH is using.
Now it is not clear if it uses the original field or the reformatted one.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
December 11, 2015, 08:59 AM
NickSmith
GamP-

Thanks, that fixed my problem. I had created a new define but I was reformatting within the GRAPH as well. Appreciate your help.

NickSmith


WebFOCUS 8
Windows, All Outputs