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     Split a subtotal into to two subtotals

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Split a subtotal into to two subtotals
 Login/Join
 
Platinum Member
posted
Is there a way to split a subtotal into 2 seperate parts based on a subvalue, Lets say department A has to sub sections a and b... i would like to split into those two sections but the total for the department as a whole would remain the same

Ex.

Department_____Class_____Sales
A______________1_________250.00
A______________1_________100.00
Subtotal of 1
percent of department 35%

A______________2_________50.00
A______________2_________25.00
A______________2_________25.00
Subtotal of 2
percent of department 10%


A______________3_________150.00
A______________3_________50.00
A______________3_________50.00
Subtotal of 3
percent of department 20%


A______________4_________100.00
A______________4_________200.00
Subtotal of 4
percent of department 30%

Subtotal of Department Aa <------
Total Sales

Subtotal of Department Ab <------
Total Sales


B______________1_________100.00
B______________1_________50.00
Etc...


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 111 | Registered: May 12, 2011Report This Post
Expert
posted Hide Post
You should be able to create (DEFINE) "buckets" for those "sub sections" and subtotal on them and department.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Platinum Member
posted Hide Post
Could you expand upon what you have said, im not quite positive on how to achieve that.

Also this would be only for on subtotal, all the rest would remain the same

Thanks for the help!


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 111 | Registered: May 12, 2011Report This Post
<FreSte>
posted
Maybe something like this ?

-* -------------------------------------------------------------------------------------
-* Create MASTER / DATA files
-* -------------------------------------------------------------------------------------
APP FI HLDFILE DISK hldfile.mas
-RUN
-WRITE HLDFILE SEGMENT=HLDFILE, SEGTYPE=S0, $
-WRITE HLDFILE  FIELDNAME=DEP        ,E01 ,A5     ,ACTUAL=A5 ,$
-WRITE HLDFILE  FIELDNAME=CLASS      ,E02 ,A1     ,ACTUAL=A1 ,$
-WRITE HLDFILE  FIELDNAME=SALES      ,E03 ,I9C    ,ACTUAL=A9  ,$

APP FI HLDFILE DISK hldfile.ftm
-RUN
-WRITE HLDFILE DepA 1      250
-WRITE HLDFILE DepA 1      100
-WRITE HLDFILE DepA 2       50
-WRITE HLDFILE DepA 2       25
-WRITE HLDFILE DepA 2       25
-WRITE HLDFILE DepA 3      150
-WRITE HLDFILE DepA 3       50
-WRITE HLDFILE DepA 3       50
-WRITE HLDFILE DepA 4      100
-WRITE HLDFILE DepA 4      200
-WRITE HLDFILE DepB 1      100
-WRITE HLDFILE DepB 1       50
-* -------------------------------------------------------------------------------------


TABLE FILE HLDFILE
  SUM
    SALES  NOPRINT
  BY DEP
  PRINT
    SALES  AS 'Sales'
    COMPUTE PCT2/D8.2% = (SALES/C1) * 100; NOPRINT
  BY DEP   AS 'Department' COLUMN-TOTAL
  BY CLASS AS 'Class'      SUBTOTAL AS 'Subtotal of '
  ON CLASS SUBFOOT
  "Percent of Department: <ST.PCT2 "
  " "
  ON TABLE SET HTMLCSS ON
  ON TABLE SET PAGE NOPAGE
  ON TABLE NOTOTAL
  ON TABLE SET BYDISPLAY ON

ON TABLE SET STYLE *
TYPE=REPORT     ,UNITS=PTS   ,FONT='VERDANA', SIZE=8        ,$
TYPE=REPORT     ,BORDER=1    ,BORDER-COLOR=RGB(210 210 210) ,$
TYPE=TITLE      ,STYLE=BOLD  ,BACKCOLOR=RGB(230 230 230)    ,$
TYPE=SUBFOOT    ,STYLE=BOLD  ,line=1 ,$
TYPE=SUBTOTAL   ,STYLE=BOLD  ,BACKCOLOR=RGB(210 210 210)    ,$
TYPE=DATA       ,TOPGAP=2    ,BOTTOMGAP=2                   ,$
TYPE=DATA       ,BACKCOLOR=(RGB(255 255 255) RGB(245 245 245)),$
ENDSTYLE
END



... or ...

TABLE FILE HLDFILE
  SUM
    SALES NOPRINT
  BY DEP
  PRINT
    SALES  AS 'Sales'
    COMPUTE ST_SALES/I9C = SALES; NOPRINT
    COMPUTE PCT2/D8.2%   = (SALES/C1) * 100; NOPRINT
  BY DEP   AS 'Department'
  BY CLASS AS 'Class'      PAGE-BREAK

  ON CLASS SUBFOOT
  "Subtotal <0> <0><ST.ST_SALES "
  "Percent of Department:<+0> <+0><ST.PCT2 "
  ON TABLE SET HTMLCSS ON
  ON TABLE SET PAGE NOPAGE
  ON TABLE NOTOTAL
  ON TABLE SET BYDISPLAY ON

  ON TABLE SET STYLE *
    TYPE=REPORT   ,UNITS=PTS         ,FONT='VERDANA', SIZE=8          ,$
    TYPE=REPORT   ,BORDER=0          ,BORDER-COLOR=RGB(210 210 210)   ,$
    TYPE=TITLE    ,STYLE=BOLD        ,BORDER-TOP=2, BORDER-BOTTOM=1,
                                      BACKCOLOR=RGB(230 230 230)      ,$
    TYPE=SUBFOOT  ,HEADALIGN=BODY                                     ,$
    TYPE=SUBFOOT  ,STYLE=BOLD+ITALIC ,BORDER-TOP=0 ,BORDER-RIGHT=0    ,$
    TYPE=SUBFOOT  ,OBJECT=FIELD      ,STYLE=BOLD, JUSTIFY=RIGHT       ,$
    TYPE=DATA     ,COLUMN=CLASS      ,JUSTIFY=CENTER                  ,$
    TYPE=DATA     ,TOPGAP=2          ,BOTTOMGAP=2                     ,$
  ENDSTYLE
END

This message has been edited. Last edited by: <FreSte>,
 
Report This Post
Platinum Member
posted Hide Post
I was trying to look at this code and find out where department A was split into 2 subsections lowercase a and b. Where in the code was department A split into 2 subsections a and b?

thanks for the reply!


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 111 | Registered: May 12, 2011Report This Post
<FreSte>
posted
After re-reading the question, I see what you mean; I missed the lowercase one's in my example.
Can you expand the dataset above with what you mean and the expected output ?
 
Report This Post
Platinum Member
posted Hide Post
Department_____Class_____Sales
A______________1_________250.00
A______________1_________100.00
Subtotal of 1
percent of department 35%
part of subdepartment a

A______________2_________50.00
A______________2_________25.00
A______________2_________25.00
Subtotal of 2
percent of department 10%
part of subdepartment b


A______________3_________150.00
A______________3_________50.00
A______________3_________50.00
Subtotal of 3
percent of department 20%
part of subdepartment a

A______________4_________100.00
A______________4_________200.00
Subtotal of 4
percent of department 30%
part of subdepartment a

Subtotal of Department A

subdepartment a <------
Total Sales

subdepartment b <------
Total Sales


B______________1_________100.00
B______________1_________50.00
Etc...

I hope this clarifies a little

each part of department A has a subdepartment
eaither a or b

and when i go to subtotal department A
i would like to further break it down into subdepartment a or b

thanks for the help!


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 111 | Registered: May 12, 2011Report This Post
<FreSte>
posted
Maybe it cannot be done in 1 run, but it will help if you could expand the above mentioned data structure on how the subdepartments fit in.
Are the subdepartments making the totals for each Department/Class ??

-WRITE HLDFILE DepA 1      250 ....
-WRITE HLDFILE DepA 1      100 .... ??
....
 
Report This Post
Platinum Member
posted Hide Post
To explain to better, its the department called candy-tabbacco and what i would like to do is instead of totaling it all in one, i would like to split it and total the tabacco and the candy seperate at the end of the department candy-tabacco

subdepartment = t for tabacco
subdepartment = c for candy


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 111 | Registered: May 12, 2011Report 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     Split a subtotal into to two subtotals

Copyright © 1996-2020 Information Builders