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     [SOLVED] GRAPH dimensions; Did I suddenly lose my ability to count?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] GRAPH dimensions; Did I suddenly lose my ability to count?
 Login/Join
 
Virtuoso
posted
I'm getting this error: (FOC32466) MERGE DIMENSIONS EXCEED THE NUMBER OF SORT FIELDS

For this GRAPH request:
DEFINE FILE HOLDFILE
DATWK/wt = DATE;
END
GRAPH FILE HOLDFILE
-* Created by Advanced Graph Assistant
SUM AMOUNT AS 'Amount'
BY GROUP AS 'Group' ROWS 'A' OVER 'B' OVER 'C' OVER 'D' OVER 'E' OVER 'Other'
ACROSS DATWK COLUMNS Thu AND Fri AND Sat AND Sun AND Mon AND Tue AND Wed
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET HAXIS 455
ON GRAPH SET VAXIS 300
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET GRID ON
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 6
ON GRAPH SET GRXAXIS 7
END


I'm pretty sure that contains 7 weekdays and 6 groups (and 1 quantity per weekday), so why am I getting this error?

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


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 :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Expert
posted Hide Post
ON GRAPH SET GRMERGE ON


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Virtuoso
posted Hide Post
Not sure why, but although it does output a GRAPH, the legend labels got replaced by numbers and the O-axis labels are rotated somehow.

Can't this be done with an advanced graph?

Our original (advanced) graph doesn't have the ROWS OVER part in the BY clause and that works.

However, from the same data another graph is rendered as well and I want to get the same line colors and legend labels as in the first graph.
For example, this month the 2nd graph has no data for groups 'B' and 'C', which causes the colors for those columns to be applied to what are really groups 'D' and 'E'...

I was hoping that explicitly adding the groups as a ROWS OVER would fix that, but then I hit the snafu that prompted me to post the issue in here.


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 :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Expert
posted Hide Post
Would you be able to provide us with some data which we can use to duplicate your issue? Or, duplicate your issue with a BASEAPP FOC file?




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
Well, as it turns out the GGSALES sample tables are similar to what we have, so I can!

As you can see in the below, the color used for 'Gifts' in the first graph isn't the same color as the one in the second graph, due to there not being any data for 'Food' in the second (because I stripped out the result to make the issue clear).

I want to make sure that the second graph will use the same colors for the same categories, WITHOUT knowing beforehand which category will have results or not.

There is a fixed set of categories in our real situation, just as there is in the GGSALES example, which is why I hoped to be able to use ROWS OVER to fixate the categories.

DEFINE FILE GGSALES
	DATWK/wt = DATE;
END
GRAPH FILE GGSALES
SUM UNITS
BY CATEGORY
ACROSS DATWK COLUMNS Thu AND Fri AND Sat AND Sun AND Mon AND Tue AND Wed
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET HAXIS 455
ON GRAPH SET VAXIS 300
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET GRID ON
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 1
ON GRAPH SET GRAPHSTYLE *
setReportParsingErrors(false);
setFillColor(getSeries(0),new Color(153,255,153));
setFillColor(getSeries(1),new Color(153,153,255));
setFillColor(getSeries(2),new Color(255,128,128));
setFillColor(getSeries(3),new Color(255,255,153));
setFillColor(getSeries(4),new Color(255,153,255));
ENDSTYLE
END

GRAPH FILE GGSALES
SUM DOLLARS
BY CATEGORY
ACROSS DATWK COLUMNS Thu AND Fri AND Sat AND Sun AND Mon AND Tue AND Wed
WHERE CATEGORY NE 'Food';
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET HAXIS 455
ON GRAPH SET VAXIS 300
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET GRID ON
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 1
ON GRAPH SET GRAPHSTYLE *
setReportParsingErrors(false);
setFillColor(getSeries(0),new Color(153,255,153));
setFillColor(getSeries(1),new Color(153,153,255));
setFillColor(getSeries(2),new Color(255,128,128));
setFillColor(getSeries(3),new Color(255,255,153));
setFillColor(getSeries(4),new Color(255,153,255));
ENDSTYLE
END


I changed the grouping into:
BY CATEGORY ROWS 'Coffee' OVER 'Food' OVER 'Gifts'

And changed the graph type with:
ON GRAPH SET GRMERGE ON


The result has '1', '2' and '3' in the legend. And still the wrong line color for 'Food' in the second graph I just noticed... (It should be red, just as in the first graph)


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 :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Virtuoso
posted Hide Post
If you do a BY ... ROWS, you basically introduce a new temporary variable that holds the sort order you specify with the ROWS command. Graph can only show one BY, and since the sort order is the first, it wil show 1, 2 and 3 in stead of the text.
The wrong color for food? Take out the WHERE statement that excludes the Food column. You'll then get the same colors.


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
I can't remove the WHERE-clause from our actual situation as it would get us the wrong results: We filter on a criterium for which there's no equivalent in GGSALES and that sometimes causes there to be no results in the time-range we're looking at, which causes the undesirable colour-shift.

I just simulated the same effect in GGSALES with that specific WHERE-clause. The effect is the same.


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 :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Platinum Member
posted Hide Post
Hi,

What has worked for me in the past was the following:

1) I create a HOLD file with my filters applied e.g.
SUM DOLLARS BY CATEGORY BY DATWK WHERE .. 
ON TABLE HOLD AS GRPHHOLD


2) I then read this file an generate my colors, based on a DECODE of colour to category
e.g.
TABLE FILE GRPHHOLD
PRINT
COMPUTE SEQ/I1 = IF LAST CATEGORY EQ ' ' THEN 0 ELSE (SEQ + 1) ; NOPRINT
COMPUTE COLR/A11 = DECODE CATEGORY(
'Coffee' '153,255,153'
'Food' '153,153,255'
'Gifts' '255,128,128'
ELSE '255,255,153'); NOPRINT
COMPUTE PRINT_LINE/A80 = 
'setFillColor(getSeries(' || (EDIT(SEQ)) ||
'),new Color(' || COLR || 
'));' ;
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE AS GRPHCOLR
END


3)
Now you have your dynamically generated colour lines which you can include in your stylesheet with "-INCLUDE GRPHCOLR"
You however run your GRAPH off the HOLD file.

Something along those lines!


WebFOCUS 8.2.06 mostly Windows Server
 
Posts: 195 | Location: Johannesburg, South Africa | Registered: September 13, 2008Report This Post
Platinum Member
posted Hide Post
Sorry ... coding without testing ;-)

Step 2 will need to be along these lines:

quote:

TABLE FILE GRPHHOLD
SUM
COMPUTE SEQ/I1 = IF LAST CATEGORY EQ ' ' THEN 0 ELSE (SEQ + 1) ; NOPRINT
COMPUTE COLR/A11 = DECODE CATEGORY(
'Coffee' '153,255,153'
'Food' '153,153,255'
'Gifts' '255,128,128'
ELSE '255,255,153'); NOPRINT
COMPUTE PRINT_LINE/A80 =
'setFillColor(getSeries(' || (EDIT(SEQ)) ||
'),new Color(' || COLR ||
'));' ;
BY CATEGORY NOPRINT
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE AS GRPHCOLR
END


WebFOCUS 8.2.06 mostly Windows Server
 
Posts: 195 | Location: Johannesburg, South Africa | Registered: September 13, 2008Report This Post
Virtuoso
posted Hide Post
Thanks for the suggestion, but this weekend I realised what the answer is. We can use "normal" WF table styling to match line colours to categories! For the legend, you still need to supply the same set of colours in the graph style section (in the same order!).

Here it is:
DEFINE FILE GGSALES
	DATWK/wt = DATE;
END
GRAPH FILE GGSALES
SUM UNITS
BY CATEGORY
ACROSS DATWK COLUMNS Thu AND Fri AND Sat AND Sun AND Mon AND Tue AND Wed
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET HAXIS 455
ON GRAPH SET VAXIS 300
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET GRID ON
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 1
ON GRAPH SET STYLE *
$
TYPE=DATA, COLOR=RGB(153 255 153), WHEN=CATEGORY EQ 'Coffee',$
TYPE=DATA, COLOR=RGB(153 153 255), WHEN=CATEGORY EQ 'Food',$
TYPE=DATA, COLOR=RGB(255 128 128), WHEN=CATEGORY EQ 'Gifts',$
ENDSTYLE
ON GRAPH SET GRAPHSTYLE *
setReportParsingErrors(false);
setFillColor(getSeries(0),new Color(153,255,153));
setFillColor(getSeries(1),new Color(153,153,255));
setFillColor(getSeries(2),new Color(255,128,128));
setFillColor(getSeries(3),new Color(255,255,153));
setFillColor(getSeries(4),new Color(255,153,255));
ENDSTYLE
END

GRAPH FILE GGSALES
SUM DOLLARS
BY CATEGORY
ACROSS DATWK COLUMNS Thu AND Fri AND Sat AND Sun AND Mon AND Tue AND Wed
WHERE CATEGORY NE 'Food';
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET HAXIS 455
ON GRAPH SET VAXIS 300
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET GRID ON
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 1
ON GRAPH SET STYLE *
$
TYPE=DATA, COLOR=RGB(153 255 153), WHEN=CATEGORY EQ 'Coffee',$
TYPE=DATA, COLOR=RGB(153 153 255), WHEN=CATEGORY EQ 'Food',$
TYPE=DATA, COLOR=RGB(255 128 128), WHEN=CATEGORY EQ 'Gifts',$
ENDSTYLE
ON GRAPH SET GRAPHSTYLE *
setReportParsingErrors(false);
setLegendDisplay(false);
ENDSTYLE
END


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 :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report 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     [SOLVED] GRAPH dimensions; Did I suddenly lose my ability to count?

Copyright © 1996-2020 Information Builders