Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Sort in Bar Graphs

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Sort in Bar Graphs
 Login/Join
 
Silver Member
posted
Hi All,

I am having problems in sorting Across.

GRAPH FILE CAR
SUM SALES
ACROSS COUNTRY
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 PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
ENDSTYLE
ON GRAPH SET STYLE *
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
$
ENDSTYLE
END

I want to sort the graph based on sales values instead of country name.


Thanks,
SG.

This message has been edited. Last edited by: Kerry,


Webfocus 7.6.8
PDF,HTML & EXCEL
 
Posts: 32 | Location: memphis,tn | Registered: January 25, 2007Report This Post
Virtuoso
posted Hide Post
If you want to sort across sales, then do so.
Only thing (in this example at least) is that a certain sales value is present more than once, so the graph is not exactly what you want if you just do an across sales.
Solution in this case is to do the sum and hold it, and then do the graph on the hold file.
TABLE FILE CAR
SUM SALES 
BY SALES
ON TABLE HOLD
END

GRAPH FILE HOLD
SUM SALES 
ACROSS SALES
....  

Hope this helps ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Virtuoso
posted Hide Post
SG,

If I understand you correctly, you want to sum sales by country but display sorted by ascending values of the summed sales.
Here is a possible solution:
  
-* File SG2.fex
SET HOLDLIST=PRINTONLY
TABLE FILE CAR
SUM CAR.BODY.SALES
RANKED BY TOTAL SALES
BY CAR.ORIGIN.COUNTRY
ON TABLE HOLD
END
DEFINE FILE HOLD
RK/I5=RANK - 1;
GRLABEL/A70 = 'setGroupLabel(' | EDIT(RK) | ', "' | COUNTRY | '");'
END
FILEDEF LABS DISK LABS.FEX
TABLE FILE HOLD
PRINT GRLABEL
BY RK NOPRINT
ON TABLE SAVE AS LABS
END
-RUN
GRAPH FILE HOLD
SUM SALES
BY RK AS Country
ON GRAPH PCHOLD AS HOLD FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET GRAPHSTYLE *
setReportParsingErrors(false);
setSelectionEnableMove(false);
setSeriesAreRows(true);
setDisplay(getO1Title(),true);
-INCLUDE LABS
ENDSTYLE
ON GRAPH SET STYLE *
ENDSTYLE
END

This message has been edited. Last edited by: Danny-SRL,


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, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Sort in Bar Graphs

Copyright © 1996-2020 Information Builders