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 developing a graph in advanced graph assistant. I haven't done much with graphs before. My x- axis has 2 field state/city and my y-axis has population of each city. How can I show top 5 cities with high population? I am trying to sort and limit values but could not get top 5. Can someone help me?
ThanksThis message has been edited. Last edited by: Kerry,
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
I tried that but it doesnt give me top 5 cities. It gives 5 sorted by city name. This is my code
TABLE FILE TEMP1
SUM
POP
BY STATE
BY CITY
ON TABLE HOLD AS TEMP2 FORMAT FOCUS
END
TABLE FILE TEMP2
PRINT TEMP2.SEG01.POP AS 'Population'
BY TOTAL HIGHEST 5 TEMP2.SEG01.REG_QTY NOPRINT
ACROSS TEMP2.SEG01.STATE AS 'State'
ACROSS TEMP2.SEG01.CITY AS 'City'
ON GRAPH PCHOLD FORMAT PNG
END
This looks good. thanks brian. But when I do the graph I get the bars sorted by city. How can I show bars starting from high populated city to lowest (descending)? thanks
APP PREPENDPATH IBISAMP
-RUN
DEFINE FILE GGSALES
CITY_ST/A25 = CITY || (', ' | ST);
END
TABLE FILE GGSALES
SUM
UNITS
BY CITY_ST
ON TABLE HOLD AS HOLD1
END
-RUN
TABLE FILE HOLD1
SUM
UNITS
ACROSS HIGHEST 10 UNITS NOPRINT
ACROSS CITY_ST
END
-EXIT
TABLE FILE TEMP1
SUM
POP
BY TOTAL HIGHEST 5 POP NOPRINT
BY STATE
BY CITY
ON TABLE HOLD AS TEMP2 FORMAT FOCUS
END
GRAPH FILE TEMP2
PRINT POP AS 'Registered Quantity'
ACROSS HIGHEST POP NOPRINT
ACROSS TEMP2.STATE
ACROSS TEMP2.CITY
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB ON
ON GRAPH SET 3D ON
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH SET VAXIS 405.000
ON GRAPH SET HAXIS 770.000
ON GRAPH SET UNITS PIXELS
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);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
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
APP PREPENDPATH IBISAMP
-RUN
DEFINE FILE GGSALES
CITY_ST/A25 = CITY || (', ' | ST);
END
TABLE FILE GGSALES
SUM
UNITS
BY HIGHEST 5 UNITS
BY CITY_ST
WHERE UNITS NE 0;
ON TABLE HOLD AS HOLD1
END
-RUN
GRAPH FILE HOLD1
PRINT
UNITS
BY HIGHEST UNITS AS ''
BY CITY_ST AS ''
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET LOOKGRAPH VBAR
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 SET GRMERGE ON
ON GRAPH SET GRAPHSTYLE *
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
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
-EXIT
This message has been edited. Last edited by: Tom Flynn,