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     How to selectively subtotal cells from a column?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
How to selectively subtotal cells from a column?
 Login/Join
 
Member
posted
Hi,

I'm a newbie and I had a quick question. I need to selectively have the values of particular cells of a column added to the subtotal. For example, say I have 3 columns, month this year(MonthTY), month last year(MonthLY), and pages(Pages). If the MonthLY is not the same as the MonthTY in any given record, then I don't want the pages for that record added to the total when I issue my RECOMPUTE. I would want the following results:

MonthTY MonthLY Pages
------- ------- -----
Apr Apr 2
Apr Apr 3
Apr Apr 4
Apr May 5
Apr May 6
Apr Apr 7
Apr May 8
Apr Apr 9
----
Total 25

The total of 25 pages is only from records where MonthTY and MonthLY are the
same. This is what I need to know how to do, instead of the default which
calculates all cells of a numeric column:

MonthTY MonthLY Pages
------- ------- -----
Apr Apr 2
Apr Apr 3
Apr Apr 4
Apr May 5
Apr May 6
Apr Apr 7
Apr May 8
Apr Apr 9
----
Total 44


The default method calculates the values of all cells in the Pages column. I need to only add those specific pages to the total AND STILL HAVE THOSE PAGES DISPLAYED even though their number is not part of the total.

Is this possible? Anyone have any samples of how this can be done?

Thanks in advance,

Joe
 
Posts: 22 | Registered: October 13, 2006Report This Post
Guru
posted Hide Post
is this what you are looking for?
TABLE FILE CAR
PRINT
  CAR 
  COMPUTE LAST_CAR/A16 = LAST CAR;
  SEATS
  COMPUTE VALID_SEATS/I3 = IF CAR EQ LAST_CAR THEN SEATS ELSE 0; NOPRINT
ON TABLE SUBFOOT
"TOTAL <CT.VALID_SEATS"
END
-RUN
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
Member
posted Hide Post
Sorry for late reply. That is what I've been told I have to settle for. I was hoping that I could do it without having to now position every field in the SUBFOOT, but if that is the only way then that is the only way.

Thanks,

Joe
 
Posts: 22 | Registered: October 13, 2006Report 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     How to selectively subtotal cells from a column?

Copyright © 1996-2020 Information Builders