Let's Get Social!
Focal Point    Focal Point Forums    WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Totals in Cross-Tables
 Go New Search Notify Tools Reply
 [CLOSED] Totals in Cross-Tables
Member
 posted June 04, 2018 09:04 AM
Hello, I have a cross-table in a report to which I need to add a 'Totals' column at the end. So basically, there are about ten rows and three columns and the last one needs to show a sum of the three. I could have simply used ON TABLE ROW-TOTAL had it been just numbers in all of the rows. However, there are a couple rows having percentages, and the ON TABLE ROW-TOTAL adds up those percentages, which is wrong; though, it works fine for other (i.e. non-percentage) rows. There's a custom calculation for getting those percentages in the totals (it's not an average by the way) which needs to be added in the cell of the Total column, if there is a way. So wanted to know if there's a workaround to handle this scenario. Any inputs will be appreciated.

To sum up, here's how I want it to be displayed -

........ X Y Z Totals
ABC 55 75 120 250
DEF 400 350 240 990
GHI 13.75 21.42 50.00 25.25
JKL 10 28 42 80

This message has been edited. Last edited by: FP Mod Chuck,

WebFocus 8, Win 10

 Posts: 2 | Location: India | Registered: May 29, 2018 IP
Virtuoso
 posted June 04, 2018 09:13 AM Hide Post
Are you calculating the percentages in your report or are they already in the percent form in the database?

WebFOCUS 8206, Unix, Windows

 Posts: 1843 | Location: New York City | Registered: December 30, 2015 IP
Member
 posted June 05, 2018 04:13 AM Hide Post
I am calculating those in the report. So if you see that sample output, the percentage (i.e. row GHI) is basically row ABC/row DEF (e.g. 55/400=13.75, 75/350=21.42, and so on..)

WebFocus 8, Win 10

 Posts: 2 | Location: India | Registered: May 29, 2018 IP
Gold member
 posted June 12, 2018 06:12 AM Hide Post
We faced same issue before - What we did is;
we created a separate HOLD files only for totals using loop (reduce the lines) based on the dynamic BY column. And joined with the main report.

8202, 8105M, 7.7.03

 Posts: 79 | Registered: June 12, 2012 IP