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     Calculating Percentage on Total

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Calculating Percentage on Total
 Login/Join
 
Silver Member
posted
When I code

TABLE FILE CAR
SUM SEATS BY COUNTRY SUBTOTAL BY CAR ACROSS MODEL
ON TABLE ROW-TOTAL
END

I get the following output

Model

100LSDOOR ………… V12XKE XJ12L TOTAL
Country Car

England Jaguar . ……… 2 5 7
Jensen . …… 4 . . 4
Triumph . …… . 2 . . 2
________________________________________________________________________________
Total England 4 2 2 5 13
________________________________________________________________________________

Italy Alpha Romeo . … 4 2 2 8
Maserati . ……… 2 2
______________________________________________________________________________________
Total Italy 4 2 2 2 10
______________________________________________________________________________________


But I need the subtotal only on Total Column. I want only 13 and 10 to be displayed across country .Also how do we calculate percentage on this Total column?

The expected report output is something like this


Model

100LSDOOR ………… V12XKE XJ12L TOTAL PERCENTAGE
Country Car

England Jaguar . ……… 2 5 7
Jensen . …… 4 . . 4
Triumph . …… . 2 . . 2
_________________________________________________________________________________________
Total England 13 56.53
_________________________________________________________________________________________

Italy Alpha Romeo . … 4 2 2 8
Maserati . ……… 2 2
__________________________________________________________________________________________
Total Italy 10 43.47
__________________________________________________________________________________________


I am not sure if this is possible. Please let me know the feasibility.


Thanks & Regards,
Sridevi
Webfocus 7.6.5 | Windows |
HTML
 
Posts: 36 | Location: India | Registered: October 06, 2005Report This Post
Silver Member
posted Hide Post
Oh!!

The output format is not clear..
you can better understand once u run the code with car


Thanks & Regards,
Sridevi
Webfocus 7.6.5 | Windows |
HTML
 
Posts: 36 | Location: India | Registered: October 06, 2005Report This Post
Platinum Member
posted Hide Post
Hi Sridevi

does this help?

TABLE FILE CAR
SUM SEATS BY COUNTRY BY CAR ACROSS MODEL
ON COUNTRY SUBTOTAL
ON TABLE ROW-TOTAL
END


Greetings,

P.


D: WF 7.6.2 P. : WF 7.6.2 on W2003
------------------------------------------------------------------
I see myself as an intelligent, sensitive human, with the soul of a clown which forces me to blow it at the most important moments.

-Jim Morrison-

 
Posts: 206 | Registered: February 25, 2005Report This Post
Silver Member
posted Hide Post
No Pete..

Its the same as my code. No difference.
If you see the output the subtotal give the total on all the columns but i require it only on the Totals not on all the columns....i.e in our example the total should only be on the Total column that we get from ROW-TOTAL and not on other Model columns.

Hope you get me.


Thanks & Regards,
Sridevi
Webfocus 7.6.5 | Windows |
HTML
 
Posts: 36 | Location: India | Registered: October 06, 2005Report This Post
Virtuoso
posted Hide Post
Try
ON TABLE COLUMN-TOTAL WHATEVER

put the specific columns you want totaled and it will only total them.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Platinum Member
posted Hide Post
See what you think of this. You can use across model or by model depending on which you like better.

DEFINE FILE CAR
P_SEATS/D6.2S = SEATS;
END
-*
TABLE FILE CAR
SUM
SEATS
PCT.P_SEATS AS 'PCT.'
BY COUNTRY
SUM
SEATS
BY COUNTRY
BY CAR
BY MODEL
-*ACROSS MODEL
ON COUNTRY SUBFOOT
" "
ON TABLE COLUMN-TOTALS SEATS PCT.P_SEATS
END

Jim


WF DevStu 5.2.6/WF Srv 5.2.4/Win NT 5.2
 
Posts: 118 | Location: Lincoln Nebraska | Registered: May 04, 2005Report This Post
Virtuoso
posted Hide Post
Try this.

DEFINE FILE CAR
SEATSF5/F5.2%=SEATS;
END

TABLE FILE CAR
SUM SEATS NOPRINT PCT.SEATSF5 NOPRINT
BY COUNTRY
SUM SEATS
BY COUNTRY SUBFOOT
" "
"Total <COUNTRY<+0>: <SEATS == <PCT.SEATSF5</1"
BY CAR
ACROSS MODEL
ON TABLE ROW-TOTAL
ON TABLE SET STYLE *
TYPE=SUBFOOT, STYLE=BOLD, COLOR=RED,$
ENDSTYLE
END


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Silver Member
posted Hide Post
Thanks a lot for all your replies

Thanks Jim and Mickey
Grt!!!

The code worked out. Smiler


Thanks & Regards,
Sridevi
Webfocus 7.6.5 | Windows |
HTML
 
Posts: 36 | Location: India | Registered: October 06, 2005Report This Post
Silver Member
posted Hide Post
Is it possible to print a BY column after ACROSS
column.

when we code

TABLE FILE CAR
SUM SEATS
BY CAR
ACROSS MODEL
BY COUNTRY
END

we get COUNTRY printed before MODEL
Is it possible to print COUNTRY after MODEL having MODEL in ACROSS?


Thanks & Regards,
Sridevi
Webfocus 7.6.5 | Windows |
HTML
 
Posts: 36 | Location: India | Registered: October 06, 2005Report This Post
Virtuoso
posted Hide Post
Sridevi,

YES, I think it is possible to do this. I will do some experimenting when I get a chance to get an example together. I know there are stylesheet commands that allow you to move columns around on the report but do not know the keywords off hand. check the manual for column positioning in the stylesheet section.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Virtuoso
posted Hide Post
Sridevi,

Try this:

TABLE FILE CAR
SUM SEATS
BY CAR
ACROSS MODEL
BY COUNTRY
ON TABLE SET STYLE *
TYPE=REPORT, COLUMN=COUNTRY, SEQUENCE=999,$
ENDSTYLE
END

The only problem with using the SEQUENCE option is that you need to know how many ACROSS columns you have so that you can position the COUNTRY column appropriately. However, setting SEQUENCE to a very high number seems to be OK so you don't need to be so exact.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
<DocServices>
posted
Hi,

For information on column positioning, try the Creating Reports With WebFOCUS Language manual.

Version 7.1: DN4500695.0905
Version 5.3: DN4500580.0904

Hope this helps.

-Jenn
 
Report This Post
Silver Member
posted Hide Post
Thanks Mickey

The Sequence option worked out.


Thanks & Regards,
Sridevi
Webfocus 7.6.5 | Windows |
HTML
 
Posts: 36 | Location: India | Registered: October 06, 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     Calculating Percentage on Total

Copyright © 1996-2020 Information Builders