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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
MULTIPLE SUBTOTALS
 Login/Join
 
Platinum Member
posted
How can I create multiple subtotals one of them being conditional?

TABLE FILE OUTPUT
SUM
AMOUNT
BY TERM
BY TERM_TYPE
ON TERM SUBTOTAL
END

So the output looks like:

TERM TERM_TYPE AMOUNT
T1 A 1000
A 500
B 2000
SUBTOTAL T1 3500

T2 A 2500
B 5000
SUBTOTAL T2 7500

TOTAL 11000

The 2nd subtotal I want to add is a subtotal by term where TERM_TYPE NE 'B', so that in the above example the grand total of this 2nd subtotal category would be 4000.


Server Environment: Win2K3 Server WebFOCUS 7.13 Apache Tomcat standalone application server
 
Posts: 188 | Registered: April 14, 2005Report This Post
Silver Member
posted Hide Post
Could be a job for FML.

Good luick,
Paul.
 
Posts: 42 | Location: UK | Registered: October 23, 2005Report This Post
Expert
posted Hide Post
it is a good fml app, i agree with paul.
but you can 'cheat'
define a new variable that equals your amount if and only if termtype is A.
bring this variable into your output matrix with a noprint
then subtotal it, as well.
MYFIELD/D8M MISSING ON=IF TERM_TYPE IS 'A' THEN AMOUNT ELSE MISSING;
...
BY TERM BY MYFIELD NOPRINT BY TERM_TYPE
ON TERM SUBTOTAL
ON MYFIELD SUBTOTAL
..this may not be the exact order or whatever that you want, but you can get the idea.
Any help?




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Master
posted Hide Post
If you want specific order, instead of using SubTotal you can use Subfoot.

MYFIELD/D8M MISSING ON=IF TERM_TYPE IS 'A' THEN AMOUNT ELSE MISSING;
...
BY TERM BY MYFIELD NOPRINT BY TERM_TYPE

ON TERM
SUBFOOT
"TERM T1 SUBFOOT
" TERM T2 WHEN TERM_TYPE NE 'B'

Hope this helps.


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Master
posted Hide Post
earlier post didn't have the full code.

MYFIELD/D8M MISSING ON=IF TERM_TYPE IS 'A' THEN AMOUNT ELSE MISSING;
...
BY TERM BY MYFIELD NOPRINT BY TERM_TYPE

ON TERM
SUBFOOT
"TERM T1 < TOT.AMOUNT"
SUBFOOT
" TERM T2 < MYFIELD "
WHEN TERM_TYPE NE 'B'


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Platinum Member
posted Hide Post
Thank you all for the suggestions. I had multiple columns being summed so I ended up creating a new calculated column which got to the end result. I will however try these options in the future.

Thanks Again!


Server Environment: Win2K3 Server WebFOCUS 7.13 Apache Tomcat standalone application server
 
Posts: 188 | Registered: April 14, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders