Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Row total for one column
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Row total for one column
 Login/Join
 
Master
posted
Hi,
I'm trying to get the Row total for only one column not for the all columns in verb request.

The sample code is below,
TABLE FILE CAR
SUM DEALER_COST
RETAIL_COST
BY CAR
ACROSS COUNTRY
ON TABLE ROW-TOTAL
END
-EXIT

If you see the Total, you will see both dealer and retail cost. I want to see the row total only for Dealer_Cost.

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


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Use RECAP after ACROSS to add a summary column on the right. Try this (untested):
TABLE FILE CAR
SUM DEALER_COST NOPRINT
SUM DEALER_COST RETAIL_COST
BY CAR
ACROSS COUNTRY
RECAP DC_TOTAL=C1;
END
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Try this.

TABLE FILE CAR
SUM DEALER_COST AS 'Tot Dealer'
BY CAR
SUM DEALER_COST
RETAIL_COST
BY CAR
ACROSS COUNTRY
END


WF 8 version 8.2.04. Windows.
In focus since 1990.
 
Posts: 189 | Location: pgh pa | Registered: October 06, 2004Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Hopefully there is a better way...but I got around this recently by creating a compute field with what I wanted.
COMPUTE TOT/D9MB = DEPT1+DEPT2 ; AS TOTAL
Then just printing it at the end.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Reply With QuoteReport This Post
Platinum Member
posted Hide Post
add the BY CAR after the first verb in j.g. solution and it works fine.

TABLE FILE CAR
SUM DEALER_COST NOPRINT
BY CAR
SUM DEALER_COST RETAIL_COST
BY CAR
ACROSS COUNTRY
RECAP DC_TOTAL=C1;
END


WF 8 version 8.2.04. Windows.
In focus since 1990.
 
Posts: 189 | Location: pgh pa | Registered: October 06, 2004Reply With QuoteReport This Post
Master
posted Hide Post
Hi JG and Spence,
Yes, this code works but I want the label to say as Total, Dealer, Cost.


Example:
TABLE FILE CAR
SUM DEALER_COST NOPRINT
BY CAR
SUM DEALER_COST RETAIL_COST
BY CAR
ACROSS COUNTRY
RECAP DC_TOTAL=C1; AS 'Total, Dealer, Cost'
END

The problem is, it is displaying Total Dealer Cost in one line. The comma is not working as how it works in Title(start in next line).


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
I just ran the code in our windows 5.3.4 and the title for the DC_TOTAL came out as three lines. Moment here, it is not removing the comma is what you're saying? I ran without the commas to HTML out and it wrapped the header but then that may be due to html.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Reply With QuoteReport This Post
Platinum Member
posted Hide Post
quote:
DC_TOTAL

try this.

TABLE FILE CAR
SUM DEALER_COST NOPRINT
BY CAR
SUM DEALER_COST RETAIL_COST
BY CAR
ACROSS COUNTRY
RECAP 'Total Dealer Cost'=C1;
END


WF 8 version 8.2.04. Windows.
In focus since 1990.
 
Posts: 189 | Location: pgh pa | Registered: October 06, 2004Reply With QuoteReport This Post
Master
posted Hide Post
Hi Spence,
This code works. Thanks


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Reply With QuoteReport This Post
Silver Member
posted Hide Post
Hi,

I used this solution because I didn't need a row total for all my across columns.

Worked great so thank you!

Now the problem...

At first, all the RECAPs were printing 2 decimals even if the original columns were not formatted that way. Then, I had to change the format of some of the columns so the $ would print. Now, my RECAP totals are size 10 font instead of size 8 like the rest of my columns (only the data, the titles are fine).

I've tried referring to them by Cn and by the field name. No dice. Any ideas?

Thanks,

Krysti


WF 767
 
Posts: 34 | Location: Chicago, IL | Registered: September 02, 2004Reply With QuoteReport This Post
Silver Member
posted Hide Post
Nevermind. I got it to work.

I added a format to the RECAPs and it picked up the size 8 font. No idea why, but it did!


WF 767
 
Posts: 34 | Location: Chicago, IL | Registered: September 02, 2004Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Row total for one column

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.