As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I am trying to graph a stacked bar chart for social media websites (facebook, twitter, myspace, etc.) My fieldname is source and in that field are the names of the websites. I get an error that says "VERTICAL AXIS IS NOT NUMERIC..CAN'T GRAPH".
Any suggestions on how I can go about doing this?
Thanks, DeniseThis message has been edited. Last edited by: DMA,
WebFOCUS v. 7.6.8 || Windows XP || Format Output: HTML, PDF, EXCEL
Posts: 57 | Location: NYC | Registered: November 13, 2008
I need to have the stacked bars show all(9) of my websites on the x-axis on a monthly basis, and the current total number of hits to each site on the y-axis.
Thanks, Denise
WebFOCUS v. 7.6.8 || Windows XP || Format Output: HTML, PDF, EXCEL
Posts: 57 | Location: NYC | Registered: November 13, 2008
On the Y-axis you have 9 fields, representing the websites, each containing the number of hits per month.
But, I understand that you have one field, "SOURCE", with the name of website. So in order to get the values desired you need a preliminary program to count the number of hits, something like:
SET ASNAMES=ON
TABLE FILE ...
SUM CNT.SOURCE AS WEB
BY MONTH
ACROSS SOURCE
ON TABLE HOLD
END
This will give you a file with 10 fields: MONTH and WEBname1 ... WEBname9
Ok till now?
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
I should have mentioned earlier that the fileds I'm using are SOURCE, CURRENT_TOTAL, PRIOR_TOTAL, and a DEFINEd field, GMONTH. I need the months on the x-axis and the CURRENT_TOTAL on the y-axis, left side and the PRIOR_TOTAL on the y-axis, right side. All 9 sources stacked on top of each other for each month.
I'm not quite sure how to explain what I need without a drawing. I hope this makes sense.
Denise
WebFOCUS v. 7.6.8 || Windows XP || Format Output: HTML, PDF, EXCEL
Posts: 57 | Location: NYC | Registered: November 13, 2008
Things are becoming clearer... So, for each GMONTH and SOURCE you have 2 values CURRENT_TOTAL and PRIOR_TOTAL. In order for WebFocus to stack your totals, you will have to: 1. create 2 fields for each SOURCE, one for the CURRENT and one for the PRIOR 2. Create a Dual-Axis stacked graph 3. Change the assignment of the CURRENT fields to one stack and the PRIOR fields to the second stack.
Here is an example using the CAR file. COUNTRY is your GMONTH DEALER and RETAIL are the CURRENT and PRIOR SEATS is the SOURCE
SET ASNAMES = ON
-*creating file with DEALER and RETAIL fields for each value of SEATS
TABLE FILE CAR
SUM
DEALER_COST AS DEALER
RETAIL_COST AS RETAIL
BY COUNTRY
ACROSS SEATS
ON TABLE HOLD AS DENISE
END
GRAPH FILE DENISE
SUM
RETAIL2
RETAIL4
RETAIL5
DEALER2
DEALER4
DEALER5
ACROSS COUNTRY
ON GRAPH SET LOOKGRAPH VBRSTK2
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
-* changed assignments to create 2 stacks
setAxisAssignment(0,0);
setSeriesType(0,1);
setAxisAssignment(1,0);
setSeriesType(1,1);
setAxisAssignment(2,0);
setSeriesType(2,1);
setAxisAssignment(3,1);
setSeriesType(3,1);
setAxisAssignment(4,1);
setSeriesType(4,1);
setAxisAssignment(5,1);
setSeriesType(5,1);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setY2LabelDisplay(true);
setY2AxisSide(1);
setY2MajorGridDisplay(true);
setY2MajorGridStyle(0);
setY2MinorGridDisplay(false);
setTextFormatPreset(getY2Label(),-1);
setTextFormatPattern(getY2Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
$
ENDSTYLE
END
Good luck!
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
DEFINE FILE METRIC_DATA_REFERRERS GDATE/MDYY=HDATE(METRIC_DT, 'MDYY'); GMONTH/MtYY=GDATE; -* CURR_DELICIOUS/P20C =IF &SOURCE EQ 'delicious' THEN CURRENT_TOTAL ELSE 0; CURR_DIGG/P20C =IF &SOURCE EQ 'digg' THEN CURRENT_TOTAL ELSE 0; -* PRIOR_DELICIOUS/P20C =IF &SOURCE EQ 'delicious' THEN PRIOR_TOTAL ELSE 0; PRIOR_DIGG/P20C =IF &SOURCE EQ 'digg' THEN PRIOR_TOTAL ELSE 0; END -* TABLE FILE METRIC_DATA_REFERRERS SUM CURR_DELICIOUS CURR_DIGG PRIOR_DELICIOUS PRIOR_DIGG BY GMONTH AS 'Month' -* WHERE SOURCE IN (&SOURCE); WHERE METRIC_DT FROM DT('&ST_DT') TO DT('&END_DT'); ON TABLE HOLD AS SOC_MED_GRAPH END
GRAPH FILE SOC_MED_GRAPH SUM CURR_DELICIOUS CURR_DIGG PRIOR_DELICIOUS PRIOR_DIGG ACROSS GMONTH AS 'Month' -* ON GRAPH SET LOOKGRAPH VBRSTK2 ON GRAPH SET GRAPHEDIT SERVER ON GRAPH SET BARNUMB OFF ON GRAPH SET 3D OFF ON GRAPH SET VZERO ON ON GRAPH SET GRID ON ON GRAPH PCHOLD FORMAT PNG ON GRAPH SET GRAPHSTYLE *
The ouput for the TABLE FILE is correct as long as I choose a specific SOURCE (delicious), except that it's not reading the hold file (ON TABLE HOLD AS SOC_MED_GRAPH). I get the following so I don't get the graph: (FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: SOC_MED_GRAPH BYPASSING TO END OF COMMAND
When I choose to display all SOURCEs I get the following: 0 ERROR AT OR NEAR LINE 35 IN PROCEDURE social_media_main (FOC003) THE FIELDNAME IS NOT RECOGNIZED: CURR_DELICIOUS BYPASSING TO END OF COMMAND (FOC009) INCOMPLETE REQUEST STATEMENT (FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: SOC_MED_GRAPH BYPASSING TO END OF COMMAND
Any ideas?
WebFOCUS v. 7.6.8 || Windows XP || Format Output: HTML, PDF, EXCEL
Posts: 57 | Location: NYC | Registered: November 13, 2008
Do we assume, as you said, that the field SOURCE can have up to 9 values? Do we assume that the user can enter up to 9 values in the variable &SOURCE - e.g. &SOURCE=facebook,myspace,youtube,digg - but you do not know in advance how many?
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
run your fex and look at the value of &SOURCE when you select all. You can then see what other errors may be generated. I suspect your error is in the table request. Try isolating the table request by commenting out the ON TABLE HOLD and puting a -EXIT after the END and see if you get the results you are looking for. Also, in the table request you do not need an AS since you are saving this to a file. If ASNAMES is on then your output file will use that as the field name and not the original(in this case GMONTH).
WF 8.2.01M 8.2.01M Reporting Server Windows 2012 Srvr R2 PDF,Excel, HTML Graphs - a lot of graphs
Posts: 60 | Location: Atlanta, GA | Registered: October 30, 2003
The way you have your DEFINE written it cannot handle multiple requests. If more than one is selected then the value will always be zero for each defined field. Put single quotes around the variable &SOURCE in your define and that will probably stop generating the errors.
WF 8.2.01M 8.2.01M Reporting Server Windows 2012 Srvr R2 PDF,Excel, HTML Graphs - a lot of graphs
Posts: 60 | Location: Atlanta, GA | Registered: October 30, 2003
DEFINE FILE METRIC_DATA_REFERRERS
GDATE/MDYY=HDATE(METRIC_DT, 'MDYY');
GMONTH/MtYY=GDATE;
-*
-* GETTOK(infield, inlen, token_number, 'delim', outlen, outfield)
-* retrieve each source from the &SOURCE parameter
-* assumption &SOURCE is of the form facebook,myspace,youtube,digg
-SET &I=1;
-#NEXTI
-* isolate one source in &P
-SET &P=GETTOK(&SOURCE, &SOURCE.LENGTH, &I, ',', 15, 'A15');
-IF &P EQ ' ' GOTO #DONE;
-* source within quotes in &Q
-SET &Q='''' | &P || '''';
-* generate CURR and PRIOR for each source
CURR_&P /P20C=IF SOURCE EQ &Q THEN CURRENT_TOTAL ELSE 0;
PRIOR_&P /P20C=IF SOURCE EQ &Q THEN PRIOR_TOTAL ELSE 0;
-SET &I=&I+1;
-GOTO #NEXTI
-#DONE
END
-* save number of input sources
-SET &IMAX=&I-1;
-*
GRAPH FILE METRIC_DATA_REFERRERS
SUM
-* generate all the CURR
-REPEAT #CURR FOR &I FROM 1 TO &IMAX;
CURR_&P
-#CURR
-* generate all the PRIOR
-REPEAT #PRIOR FOR &I FROM 1 TO &IMAX;
PRIOR_&P
-#PRIOR
ACROSS GMONTH AS 'Month'
-*
WHERE SOURCE IN (&SOURCE);
WHERE METRIC_DT FROM DT('&ST_DT') TO DT('&END_DT');
ON GRAPH SET LOOKGRAPH VBRSTK2
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
-* create 2 stacks
-* CURR stack
-SET &CMAX=&IMAX - 1;
-REPEAT #ASSIGN0 FOR &I FROM 0 TO &CMAX;
setAxisAssignment(&I,0);
setSeriesType(&I,1);
-#ASSIGN0
-* PRIOR stack
-SET &PMAX=&IMAX * 2 - 1;
-REPEAT #ASSIGN1 FOR &I FROM &IMAX TO &PMAX;
setAxisAssignment(&I,1);
setSeriesType(&I,1);
-#ASSIGN1
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setY2LabelDisplay(true);
setY2AxisSide(1);
setY2MajorGridDisplay(true);
setY2MajorGridStyle(0);
setY2MinorGridDisplay(false);
setTextFormatPreset(getY2Label(),-1);
setTextFormatPattern(getY2Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
$
ENDSTYLE
END
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
If what I sent you doesn't work and if it is possible, please create a HOLD file, format ALPHA, in which there will be the fields: GMONTH SOURCE CURR_TOTAL PRIOR_TOTAL
TABLE FILE METRIC_DATA_REFERRERS
PRINT GMONTH SOURCE CURR_TOTAL PRIOR_TOTAL
ON TABLE HOLD AS DENISE FORMAT ALPHA
END
Send DENISE.FTM and DENISE.MAS. You will find my e-mail address on my profile.
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006