Focal Point
DST in graph???

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

June 19, 2006, 02:40 PM
LEX-IA
DST in graph???
PAGE 1

JOBCODE SALARY DEPARTMENT PCT
A01 19,000 PRODUCTION 100.00%
A07 40,000 MIS 45.00%
PRODUCTION 55.00%
A15 53,724 PRODUCTION 100.00%
A17 83,824 MIS 64.57%
PRODUCTION 35.43%
B02 50,680 MIS 36.46%
PRODUCTION 63.54%
B03 36,960 MIS 100.00%
B04 42,900 MIS 50.77%
PRODUCTION 49.23%
B14 13,200 MIS 100.00%


Hi guys Smiler
I have to graph the above using a VLINE2 graph to capture the percentages on one axis and the total on the other axis.
Y1 in % and Y2 in real numbers..i.e 19,000

The trick is that graph is going to be dynamic therefore the user will first select the department….
For example user selects department: MIS for CURR_JOBCODE A07.
The graph should display 45% for MIS on Y1 and on 40,000 on Y2.

My complication is that I cant add the TOTALSALARY field in the graph because of the by field. and i cant use the DST function with a graph....

any suggestions???

Here is the code:


TABLE FILE EMPLOYEE
PRINT
*
ON TABLE HOLD AS TRENDS FORMAT ALPHA
END
DEFINE FILE TRENDS
TOTALSALARY/D20 = CURR_SAL;
SALARY/D20 = CURR_SAL;
END
TABLE FILE TRENDS
SUM
TOTALSALARY
BY CURR_JOBCODE
SUM COMPUTE PCT/D8.2S% = SALARY/TOTALSALARY * 100;
BY CURR_JOBCODE
BY DEPARTMENT
ON TABLE HOLD AS SOURCE
END
GRAPH FILE SOURCE
PRINT
PCT AS '=>'
BY DEPARTMENT
ACROSS CURR_JOBCODE AS ''
ON GRAPH SET LOOKGRAPH VLINE2
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET GRMERGE ON
ON GRAPH SET VAXIS 290
ON GRAPH SET HAXIS 1200
ON GRAPH SET 3D OFF
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
(...)
ENDSTYLE
END

This message has been edited. Last edited by: LEX-IA,


PROD: WebFOCUS 7.1.0 on Linux/Tomcat 5.5.12 (standalone)/Informix on AIX
TEST: WebFOCUS 7.1.3 on Linux/Tomcat 5.5.16 (standalone)/Informix on AIX
June 27, 2006, 06:10 AM
kalyanswarna
Hi lex try with the following code
GRAPH FILE FILE NAME
SUM SALARY,PCT
BY JOBCODE
.........
TRY WITH THIS

Thanks,


Thanks,
Kalyan.S
------------------------------------
WebFOCUS 7.1.4, Win XP SP2,
Oracle8i.
------------------------------------
June 27, 2006, 10:12 AM
LEX-IA
Hi Kalyan,
Thanks for your reply but this wont work.The by field is giving me the salary as well as the pct by jobcode. I am looking for the percentage by jobcode and the total salary. The total salary is totalled not by jobcode.

This message has been edited. Last edited by: LEX-IA,


PROD: WebFOCUS 7.1.0 on Linux/Tomcat 5.5.12 (standalone)/Informix on AIX
TEST: WebFOCUS 7.1.3 on Linux/Tomcat 5.5.16 (standalone)/Informix on AIX