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] removing zero totals

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] removing zero totals
 Login/Join
 
Member
posted
Does anyone know how to remove/not show totals that equal zero. I have tried using the where total tab (amount field NE to zero) but that didn't work. Any ideas?

Here is a sample of my data:

Name Balance
Jane Doe 500
Bill Smith 0.0-don't want this to show
Kate Jones -100

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


Joanna

WebFOCUS 7.6, Windows
All output
 
Posts: 1 | Registered: December 10, 2009Report This Post
Platinum Member
posted Hide Post
Hi Joanna,

I'm not sure if you are doing row total or column total/subtotal.

For subtotal, you can do a WHEN on it.
eg.
TABLE FILE EMPDATA
SUM
SALARY
BY DIV

ON DIV SUBTOTAL AS '*TOTAL'
-* This is the WHEN statement
WHEN SALARY GE 350000;
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE COLUMN-TOTAL AS 'TOTAL' SALARY
ON TABLE PCHOLD FORMAT HTML
END

Best Regards,

Jimmy Pang


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
 
Posts: 117 | Location: Toronto, Ontario, Canada | Registered: February 29, 2008Report This Post
Virtuoso
posted Hide Post
Hello Joanna,

Based on your example I don't see why the WHERE TOTAL construct wouldn't work in our case.

Here's an example of Total Sales by Country using the CAR table:

  
TABLE FILE CAR
SUM SALES
BY COUNTRY
HEADING
"Total Sales by Country"
END


Notice that FRANCE had a total sales of 0. If you wanted that entry to be removed from the report, then WHERE TOTAL would be the way to go:

  
TABLE FILE CAR
SUM  SALES
BY COUNTRY
WHERE TOTAL SALES NE 0
HEADING
"Total Sales by Country (excluding 0 sales)"
END


Is that what you need?

Now it might be possible that what you are seeing in your report as 0.00 is in reality the formatted version of a different value (such as 0.00001) which would imply a data precision issue. It would help if you give us some more details about your masterfile structure and in particular the data type and length of the AMOUNT field along with a code snippet that illustrates the logic being used to exclude aggregated values of 0.

To illustrate my point, please take a look at the code below in which I'm making up a very small COMMISSION on sales and a new computed field TOT_COMMISSION is created to capture the aggregated commission by country. Notice that even though TOT_COMMISSION is displayed as 0.00 in reality it represents a different internal value and that's why WHERE TOTAL cannot filter it out.

DEFINE FILE CAR
COMMISSION/D20.15 WITH SALES = SALES * 0.000000001;
END
TABLE FILE CAR
SUM
        SALES
        COMMISSION
COMPUTE TOT_COMM/D20.2 = COMMISSION;
BY COUNTRY
WHERE TOTAL TOT_COMM NE 0
HEADING
"Total Sales by Country"
END


If that is your case you might need to HOLD your request using an appropriate formatted value (such as D20.2 for example) and then running the report out of the HOLD file.

Hope that helps,

Regards,
- Neftali.

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



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
<JG>
posted
quote:
(such as D20.2 for example)

The Idea is correct but the format wrong.

Dn.m format does not hold an absolute value.

You must convert to either integer or packed format.
Or use a GT 0 AND LT 0.0049999 type selection
 
Report 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] removing zero totals

Copyright © 1996-2020 Information Builders