Focal Point
[SOLVED] Subtotalling only on few rows

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1157091826

January 24, 2013, 11:23 AM
Divya
[SOLVED] Subtotalling only on few rows
Hi All,

I have a requirement where I need to display the report right from the beginning of the year till the current week or the user entered week.

Data is displayed by months for all the previous weeks, and only for current month, it should be split in weeks on the report.

For the current week entered(in case this is week 2 of that month), User also wants to see monthly total for that row.
In my report for eg: I am displaying data right from January till August week 2 and also Quarterly sum just after every quarter, YTD in the end. Data is displayed from Jan till July and then for August week1 & week2.
Now I also need August sum(subtotal only for the weeks) and need to pull that as monthly total till date. After this subtotal current quarter & YTD rows needs to be displayed.

Hope the requirement is clear, I am unable to pull a subtotal row only for weeks data. Let me know If there is a way to do this without creating a separate report and appending it.

As the entire logic already put in place, I didnt want to distort the report only for one subtotal row.

Your quick answer really helps!!!

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


7.1.4
Windows
Excel, HTML,PDF
January 24, 2013, 11:57 AM
Francis Mariani
Your requirements confuse me, but have you looked into the WHEN expression of the SUBTOTAL command?

quote:
WHEN expression: Specifies the conditional display of subtotals as determined by a Boolean expression.



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
January 24, 2013, 12:18 PM
Divya
I am unable to paste the screen shot here.
But report looks like this.

Feb ...............
March...............
April.............
"
"
Aug wk1
Aug wk2
Subtotaling row here is necessary for month..
QTD
YTD

Cannot pull Month data, as we need only 2 weeks data only to be added and displayed.


7.1.4
Windows
Excel, HTML,PDF
January 24, 2013, 02:04 PM
FrankDutch
How is your data available ? On daily basis?
If so you can create a subtotal field based on that field.

Suppose that field is DBDATUM format YYMD .


-SET &MINUS14=&YYMD-14;
DEFINE FILE XXXX
BREAK/YYMD=IF DBDATUM GE '&MINUS14' DATEMOV(DBDATUM,'BOW') ELSE DATEMOV(DBDATUM ,'BOM');
END

TABLE FILE XXXX
SUM AMOUNT
BY BREAK
END


I am sure this is not giving you all what you need, but it is a start to think.
Based on this idea you can create an extra sortcode like 'W' or 'M' you can use to create subtotals.
It is also possible to create a quarter total at the same idea and if you know how to use mcguyver you can combine that technique to this to create exactly the report you need.

Finally you also may look at FML.

Good luck




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

January 29, 2013, 10:06 PM
Divya
Thnaks for the suggestions, I was able to solve this by using WHEN condition in Subtotalling.


7.1.4
Windows
Excel, HTML,PDF