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] RECOMPUTE causing next row value to repeat

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] RECOMPUTE causing next row value to repeat
 Login/Join
 
Silver Member
posted
We have a very strange thing occuring when we use a RECOMPUTE where the title of the row before the RECOMPUTE is repeated after the RECOMPUTE. The following code (not the entire fex but the important part):
  
TABLE FILE BRAND_US
SUM
   CURR_QTY
   CURR_FET_PRICE
   CURR_FET_GP
   PREV_QTY
   PREV_FET_PRICE
   PREV_FET_GP
BY DIVISION
BY HERC_BRANDS
BY BRAND
ON TABLE HOLD AS BRAND_HD
MORE
FILE BRAND_CA
MORE
FILE BRAND_ALL
END
DEFINE FILE BRAND_HD
QUANTITY/D15.2=CURR_QTY;
PQUANTITY/D15.2=PREV_QTY;
AFIELD/I1=0;
END
TABLE FILE BRAND_HD
SUM
     COMPUTE R_CNT/I5=IF HERC_BRANDS EQ 'HERCULES BRANDS' THEN 0 ELSE (R_CNT + 1); NOPRINT
	 COMPUTE PRT_BRAND/A20=IF R_CNT LE 15 THEN BRAND ELSE 'Others';
 AS 'Brand'
     CURR_QTY/I10C AS '2012,YTD, Units'
     PCT.QUANTITY/D9.1%  WITHIN DIVISION
 AS 'Units,% Total'
     CURR_FET_PRICE/P12CM
 AS 'YTD, Sales $'
     PCT.CURR_FET_PRICE/D9.1%  WITHIN DIVISION
 AS 'Sales $,% Total'
     CURR_FET_GP/P12CM
 AS 'YTD, GP $'
     COMPUTE CGP/D9.1% = CURR_FET_GP / CURR_FET_PRICE * 100;
 AS 'GP %'
     COMPUTE BLKCOL/A5 = IF AFIELD EQ 0 THEN '     ' ELSE '     '; AS ''
     PREV_QTY/I10C AS 'FY,2011,YTD, Units'
     PCT.PQUANTITY/D9.1%  WITHIN DIVISION AS 'Units,% Total'
     PREV_FET_PRICE/P12CM
 AS 'YTD, Sales $'
     PCT.PREV_FET_PRICE/D9.1%  WITHIN DIVISION
 AS 'Sales $,% Total'
     PREV_FET_GP/P12CM
 AS 'YTD, GP $'
     COMPUTE PGP/D9.1% = PREV_FET_GP / PREV_FET_PRICE * 100;
 AS 'GP %'
     COMPUTE QTY_DIFF_PCT/D9.1% = ( CURR_QTY - PREV_QTY ) / PREV_QTY * 100;
 AS 'Units,YTD,% Diff'
     COMPUTE PRICE_DIFF_PCT/D9.1% = ( CURR_FET_PRICE - PREV_FET_PRICE ) / PREV_FET_PRICE * 100;
 AS 'Sales $,YTD,% Diff'
     COMPUTE GP_DIFF_PCT/D9.1% = ( CURR_FET_GP - PREV_FET_GP ) / PREV_FET_GP * 100;
 AS 'GP $,YTD,% Diff'
     COMPUTE GPP_DIFF_PCT/D9.1% = ( CGP - PGP ); AS 'GP %,YTD,% Diff'
BY DIVISION NOPRINT
BY HERC_BRANDS RECOMPUTE AS '' NOPRINT
BY HIGHEST 15 CURR_FET_PRICE PLUS OTHERS NOPRINT

ON DIVISION RECOMPUTE AS '*TOTAL'

FOOTING
" "
"Prepared on &DATE"
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET COMPOUND 'BYTOC 1'
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=LANDSCAPE,
$

Produces output as follows:

Brand Quantity.....
HERCULES 9999
MERIT 999
SIGNET 1
HERCULES BRANDS
10999
SIGNET 8888
FALKEN 777
and so on. (Had to throw the split total line in because we all pain on that....)
The SIGNET after the RECOMPUTE should actually be COOPER which the values are correct for.
If I change the RECOMPUTE to a SUBTOTAL it prints COOPER there but the problem is the GP % sums instead of getting recalculated.
Has anyone else seen this problem? And how to correct?
We are on 7.6.10.
Thanks for any help.

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


WebFOCUS 7.7.03
Windows
all output (Excel, HTML, PDF)
 
Posts: 29 | Registered: March 04, 2010Report This Post
Expert
posted Hide Post
It would be much easier for us to help you debug this problem if you created an example with one of the sample databases, perhaps one of the Gotham Grinds tables, GGSALES, GGORDERS, etc. If you can reproduce the problem, we can perhaps edit the code and suggest a solution.

Cheers,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Silver Member
posted Hide Post
Okay with GGSALES:

  
DEFINE FILE GGSALES
NE_REGION/A20=IF GGSALES.SALES01.REGION EQ 'Northeast' THEN 'Northeast Region' ELSE 'Other Regions';
END
TABLE FILE GGSALES
SUM 
     'GGSALES.SALES01.UNITS'
     'GGSALES.SALES01.DOLLARS'
     'GGSALES.SALES01.BUDDOLLARS'
BY 'GGSALES.SALES01.CATEGORY'
BY 'GGSALES.SALES01.NE_REGION'
BY 'GGSALES.SALES01.ST'
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF 
ON TABLE NOTOTAL
ON TABLE HOLD AS GG_HOLD FORMAT ALPHA
END
TABLE FILE GG_HOLD
SUM 
     COMPUTE R_CNT/I5 = IF GG_HOLD.GG_HOLD.NE_REGION EQ 'Northeast Region' THEN 0 ELSE ( R_CNT + 1 ); NOPRINT
     COMPUTE PRT_ST/A6 = IF R_CNT LE 5 THEN GG_HOLD.GG_HOLD.ST ELSE 'Others';
 AS 'ST'
     'GG_HOLD.GG_HOLD.UNITS'
     'GG_HOLD.GG_HOLD.DOLLARS'
     COMPUTE PCT_BDG/D6.1% = ( GG_HOLD.GG_HOLD.DOLLARS / GG_HOLD.GG_HOLD.BUDDOLLARS ) * 100;
BY 'GG_HOLD.GG_HOLD.CATEGORY'
BY 'GG_HOLD.GG_HOLD.NE_REGION' RECOMPUTE AS '' NOPRINT
BY HIGHEST 5 'GG_HOLD.GG_HOLD.DOLLARS' NOPRINT PLUS OTHERS AS 'OTHERS'
     
ON GG_HOLD.GG_HOLD.CATEGORY RECOMPUTE AS '*TOTAL'
     
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON


Produces the following output:

CATEGORY ST UNITS DOLLARS PCT_BDG
Coffee NY 116659 1459160 99.4%
CT 109491 1364420 97.8%
MA 109628 1340437 96.5%

Northeast Region 335778 4164017 97.9%

MA 235583 2937886 99.2%
GA 127176 1576915 95.2%
WA 121180 1535631 98.2%
FL 114996 1463453 103.9%
IL 109581 1398779 102.4%
Others 331972 4154774 101.7%

Other Regions 1040488 13067438 100.2%
*TOTAL Coffee 1376266 17231455 99.6%

Food NY 125473 1555165 99.1%
CT 114439 1424718 99.2%
MA 113456 1400111 96.7%

Northeast Region 353368 4379994 98.3%

MA 222711 2768512 101.9%
IL 118068 1522847 102.8%
GA 120284 1490457 97.4%
MO 115731 1463901 102.2%
WA 117523 1433825 97.8%
Others 337160 4169797 99.6%

Other Regions 1031477 12849339 100.3%
*TOTAL Food 1384845 17229333 99.8%

Gifts CT 78510 992911 99.3%
MA 78825 967438 98.5%
NY 70194 887940 99.9%

Northeast Region 227529 2848289 99.2%

NY 152276 1935863 101.4%
WA 82766 1041229 101.5%
FL 79982 1034253 103.3%
GA 82823 1032735 97.4%
IL 79932 1002775 98.3%
Others 222572 2800358 100.9%

Other Regions 700351 8847213 100.7%
*TOTAL Gifts 927880 11695502 100.3%

If I change the NE_REGION to from RECOMPUTE to SUBTOTAL the output is as follows:

CATEGORY ST UNITS DOLLARS PCT_BDG
Coffee NY 116659 1459160 99.4%
CT 109491 1364420 97.8%
MA 109628 1340437 96.5%

Northeast Region 335778 4164017 293.7%

CA 235583 2937886 99.2%
GA 127176 1576915 95.2%
WA 121180 1535631 98.2%
FL 114996 1463453 103.9%
IL 109581 1398779 102.4%
Others 331972 4154774 101.7%

Other Regions 1040488 13067438 600.6%
*TOTAL Coffee 1376266 17231455 99.6%

Food NY 125473 1555165 99.1%
CT 114439 1424718 99.2%
MA 113456 1400111 96.7%

Northeast Region 353368 4379994 295.0%

CA 222711 2768512 101.9%
IL 118068 1522847 102.8%
GA 120284 1490457 97.4%
MO 115731 1463901 102.2%
WA 117523 1433825 97.8%
Others 337160 4169797 99.6%

Other Regions 1031477 12849339 601.8%
*TOTAL Food 1384845 17229333 99.8%

Gifts CT 78510 992911 99.3%
MA 78825 967438 98.5%
NY 70194 887940 99.9%

Northeast Region 227529 2848289 297.7%

CA 152276 1935863 101.4%
WA 82766 1041229 101.5%
FL 79982 1034253 103.3%
GA 82823 1032735 97.4%
IL 79932 1002775 98.3%
Others 222572 2800358 100.9%

Other Regions 700351 8847213 603.0%
*TOTAL Gifts 927880 11695502 100.3%

In the first output the first State in the Other Regions is repeated from the last State in the Northeast Region. In the second output the first State in the Other Regions is now correct.
I'm totally confused as to why this is happening.


WebFOCUS 7.7.03
Windows
all output (Excel, HTML, PDF)
 
Posts: 29 | Registered: March 04, 2010Report This Post
Expert
posted Hide Post
In v7.7.02 and v7.7.03 I see no difference (other than the %):



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report 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] RECOMPUTE causing next row value to repeat

Copyright © 1996-2020 Information Builders