Single Bottom row Sum of running total
That's a terrible title. LOL Sorry. Here's what I am doing in Numbers '08---I am setting up my budget, and I have several small tables for my various categories like Mortgage or Grocery. In each small table, I have a very simple structure of a Date Column, an Expense Column and a Deposit Column and a Running Total.
Mortgage Da
Expense
Deposit
Running Tot
$0
Jan 1, 2014
$1,770.19
$1,770.19
Jan 7, 2014
$1,770.19
$0.00
Jan 23, 2014
$885.09
$885.09
Sorry its not pretty. OK, SO, WHAT I WANT is to be able to have a single cell at the bottom of the chart that constantly shows the last running total amount. When I make a new expense or deposit, that $885.09 will go up or down and be shown on the next row. BUT, I want to be able to have that next running total still shown in one lower, bottom row sum total.
What I am trying to do with that is then have a general check book budget list of the main categories. I want to take the bottom row sum total for Mortgage or Internet or Grocery and the other tables into one single list. That list of categories would constantly stay current based on the information I put into the different tables. In that master list, what is there allows me to see a global look at my budget, and (hopefully) should match my checkbook.
Any ideas?
Hi Carl,
WHAT I WANT is to be able to have a single cell at the bottom of the chart that constantly shows the last running total amount.
Is something like this what you mean?
Row 1 is a Header Row. Row 8 is a Footer Row. The formula in D8 is:
=INDEX(D,COUNTA(D)+1,1)
It counts the number of non-blank cells in column D and uses that count to retrieve the value in the last cell in that column that is not blank.
SG
Similar Messages
-
We have migrated one application from .net framework 1.0 to .net framework 2 (from Visual studio 2003 to Visual STUDIO 2005). Now after migration we are facing some problem related to the sum function in Crystal report 10. It is not working properly.
So we migrated to Crystal report XI release 2 (though still using evaluation version for testing purpose), the problem is not yet resolved.
The problem we are facing is while using the summary in the group field, it is showing the number of rows instead of the sum of the values.
We have checked the same with min-max functions, and it is working properly with those.
We have tried to make the sum by formula field. In such case, it is not showing any syntactical error but at execution time, it is throwing an error saying "A number field or currency amount field is required here".
In the the report the datatype of the field on which we are applying the sum function, is number, and in the table from where the data is fetched, the datatype is numeric(9,6).
Any idea why sum function is not working ?
I was browsing the net and saw running totals can be a work around for such summation issues in Crystal Report XI.
Can you please provide insight of how to implement running totals for summation purpose in solving such issues.Hi,
Running totals are more accurate than Summary Totals in Crystal. Why? ...ask Crystal. Anyway, just right click on Running Totals, create a new one, and enter you fields, etc. For group totals, it gives you a place to reset the totals for each group, etc. Pretty self explainatory.
Jim -
Running total for duplicate rows
Hi,
I am trying to write an sql which shows the running total for records which has duplicate. Please share any idea to get this.
sample rows:
col1 col2 col3
1 A 2
1 A 2
1 A 2
1 B 3
1 B 3
1 C 5
1 D 2
1 D 2o/p required:
col1 col2 col3 cumulative_tot
1 A 2 2
1 A 2 2
1 A 2 2
1 B 3 5
1 B 3 5
1 C 5 10
1 D 2 12
1 D 2 12Hi,
Try this:
WITH A AS
select 1 col1, 'A' col2, 2 col3 from dual union all
select 1 col1, 'A' col2, 2 col3 from dual union all
select 1 col1, 'A' col2, 2 col3 from dual union all
select 1 col1, 'B' col2, 3 col3 from dual union all
select 1 col1, 'B' col2, 3 col3 from dual union all
select 1 col1, 'C' col2, 5 col3 from dual union all
select 1 col1, 'D' col2, 2 col3 from dual union all
select 1 col1, 'D' col2, 2 col3 from dual
,B AS
SELECT
A.*
,ROW_NUMBER() OVER (PARTITION BY COL1, COL2 ORDER BY 1) RN
FROM
A
SELECT
B.*
,SUM(CASE WHEN RN = 1 THEN COL3 ELSE 0 END) OVER ( ORDER BY COL1, COL2 ,RN ) cumulative_tot
FROM
B
COL1 COL2 COL3 RN CUMULATIVE_TOT
1 A 2 1 2
1 A 2 2 2
1 A 2 3 2
1 B 3 1 5
1 B 3 2 5
1 C 5 1 10
1 D 2 1 12
1 D 2 2 12
8 rows selected Regards,
Peter -
is there any method to create row wise running total in Crystal Reports?
>
gourav.sengupta wrote:
> Hi,
>
> I needed a running total but for rows. Therefore if the data set is in the following manner:
>
> Column 1 Column 2 Column 3 Column 4
> A 12 13 14
> B 11 10 19
>
> The the running total will appear as:
> RT 23 23 33
>
>
> Thanks and Regards,
> Gourav
I am confused as to what you want.
Your sample shows sums for collumns, not rows. You do not need a running total for this, just sum them.
If you want to total each row, make a formula that adds them up and place on the row. -
Need to sum hh:mm:ss in crystal report using Running Total Fields
Hello,
I am new to .Net and crystal reports so please go easy on me.
I am trying to develop a crystal report using Visual Basic .NET. I have a column which displays the "Inbound Time" in "hh:mm:ss" format. I have to sum the total inbound time and display it.
I tried using the Running Total and i am not successful.
Here is the code which I am using in the Running total
WhilePrintingRecords;
if isNumeric({Report3;1.TotalInboundTime}) then
{Report3;1.TotalInboundTime}
else
CStr ({Report3;1.TotalInboundTime});
NumberVar array test2 := [ToNumber(left(CStr({Report3;1.TotalInboundTime}),2)),ToNumber(mid(Cstr({Report3;1.TotalInboundTime}),4,2)),ToNumber(right(Cstr({Report3;1.TotalInboundTime}),2))];
StringVar test1 := CStr( (ToNumber(test2[1])3600)+(ToNumber(test2[2])60)+(ToNumber(test2[3])));
InboundTime is the time field which is in "hh:mm:ss" format.Hello Bharathi,
There are a couple of KBs about this. I haven't tested them myself, but you could give them a try:
[How sum multiple time fields in Crystal Reports|http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2008378]
[Creating a running total to show the difference between two datetime fields |http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2010261]
[Totalling time values that are stored as numbers in the database|http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2005576]
Cheers,
Fritz -
Running total in group header doesn't display when it's at page bottom
Post Author: Charles Denight
CA Forum: Formula
Hi, Using v.9 of Crystal Reports I've created some running totals using a cross-tab workaround to get the running totals into the group headers, but when the group header falls at the bottom of the page then the running total doesn't show up.Would appreciate knowing why and how to fix this.Replacing an item that is malfunctioning because of a manufacturing error is the bare minimum I would expect from customer service for any electronics item.
The thing Apple does extremely well is their flat fee policy for repairs on their computers.
I managed to break my MacBook pretty seriously (logic board needed to be replaced) and I'm sure it cost them more to repair the unit than the $328 they charged me.
I probably would have been angry if it was something minor, but I'm guessing that most repairs to screens/motherboards/etc cost more than their flat fees. -
Can i sum and couunt running total in formula?.
Please let me know.Hey, we can do count and sum functions in Running total.
These functions are available in crystal reports for summary fields.
We can create the running total based on the type of summary like Sum, count, max, min, distinct count, etc.
We can do Evaluation for each record or on group or on each field and also be done by writing a formula.
We can do count or sum by manual running total by writing a formula in the formula workshop.
Based on our requirement we can use both functionalities.
Please let me know if you have any queries.
Regards,
Naveen. -
I have a dynamic table that calculates the sum of all rows, no issue. I'm struggling with pulling out a subtotal though. I would like to have a check box in each row that flags those rows and gives the sum of their total. Any help would be greatly appreciated.
Here's something I threw together rq. The script is in the change event for the checkbox in the table. (Of course, you'll have to modify it to suit the names of your fields.)
var rows = xfa.resolveNodes("tblAmounts.Row1[*]");
var subtotal=0;
for (i=0; i<rows.length; i++) if (rows.item(i).cbAdd.rawValue == 1) subtotal = subtotal + rows.item(i).nfAmount.rawValue;
nfSubtotal.rawVlaue=subtotal; -
How can I display the vendor associated with result of my running total sum
I have a report that lists vendors with their most vecent order dates. I need to set up a rotation so that the vendor with the latest order date is next to be selected. I used the running total summary to pick the latest date. How can I display the vendor associated with result of my running total summary?
If your "latest" order date means the "oldest" order date, why don't you try this:
Go to Report tab -> Record Sort Expert -> Choose your order date in ascending order
This will make your oldest order your first record shown.
You can then create a running total count for each record.
Lastly, in your section expert under conditional suppress X+2 formula, write this:
{#CountRecords}>1
The result will only show the oldest record in your report.
I hope that helps,
Zack H. -
Sum values to display total (running total)
I apologize for posting such a rudimentary question but I haven't been able to find an answer by searching the forum.
Basically, I have several sensor inputs that are all factored into an equation that yeilds heat output (btu/hour). I need to take this value, which I have iterating once every second, and add it to itself every time it increments. In other words, say the first value is 10 (btus), the next second the value is 16, the code calculates and displays a value of 26 on the front panel and waits for the next second (or whatever iteration I choose) at which time it will add the new value to the running total.
Thanks for your input
Jake
Solved!
Go to Solution.The Loopback function (<--) is basically a miniature shift register.
/Y
LabVIEW 8.2 - 2014
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
G# - Free award winning reference based OOP for LV -
Cumulative Sum/Running Total Help
I have searched through the existing questions for some help, but cannot find a similar question.
I am attempting to do a running total on a field where one week could not have anything to "add" to the running total. Is there a way to get the running total to show for a group that does not have data in the set? The data, received results and desired results are below. I only get the running total to show when there is data, but I would like to show the running total regardless.
ex data:
groups
39 38 37 36 35 34 33
counts for running total
1 0 0 3 2 0 1
received results:
groups
39 38 37 36 35 34 33
counts for running total
1 0 0 4 6 0 7
desired results:
groups
39 38 37 36 35 34 33
counts for running total
1 1 1 4 6 6 7I take it that under Received Results, the groups with zero counts are not actually showing, not that they are showing zeros, right? If that is the case...
You have to ensure that you get a record from your data set for every group. For example, if your data is currently returning the group and the count, you could use a database command as your data source that looks something like this (MS SQL):
select groups.code, isnull(data.counter, 0) as Counter
from groups
left outer join (
select data.code, count(*) as counter
from data
where data.date between dateadd("d", -7, getdate()) and getdate()
group by data.code
) data on groups.code = data.code
This will return records like:
Code Counter
39 1
38 0
37 0
36 3
35 2
34 0
33 1
Now that you're getting a record for each group, your report should then show the running total for each group.
HTH,
Carl -
Running Total (or) Moving Sum (or) Rollup using Date functions
I have to pass the Begin date and End date using prompt in my application (for daily basis for one month, monthly and yearly).
How can i use the date function for Rollup the days values(running total) for the below mentioned SQL
Table.Date field (@Prompt('Begin_Date','D',,mono,free) and @Prompt('End_Date','D',,mono,free)
@prompt automatically takes the begin date and end date.
I need the sql for rollup(running total) on daily basis for one month say jan 1 to jan 31.
Any idea?Check the Oracle on-line documentation on the ROLLUP option of the GROUP BY clause. It should be able to give you running totals.
-
XML 5.6.1 Running Total
Hi
I am new this XML Publisher. We are working on using BPA/XML Publisher to print the AR Invoice. I have two questions
1. How to print the values of subtotal, tax and Invoice Total in only last page
2. How to print the Running total of extend amount at the end of the each page. This Running total need to be printted once in a Page.
Thanks
MariappanHave you placed it outside your group, you just place it at the bottom end of your template and put a group around your sum total.
Then it it will only be printed on your last page.
you need a for tag
ex. <?for-eachG_TAX?>
Then the sum
ex. <?sum(current-group()//VAT)?>
Then the end tag
ex. <?end for-each?> -
Running total of calculated field in pivot
VERSION: ORACLE 11
TABLE:
create table chart_detail (
DIS NUMBER,
BLD_MO VARCHAR2(7),
BLD NUMBER(10),
RPLC NUMBER(10));DATA:
insert into chart_detail values (60,'2011-03',0,2);
insert into chart_detail values (150,'2011-04',10572,0);
insert into chart_detail values (120,'2011-04',26449,5);
insert into chart_detail values (30,'2011-04',0,1);
insert into chart_detail values (60,'2011-04',0,7);
insert into chart_detail values (90,'2011-04',0,9);
insert into chart_detail values (120,'2011-05',5714,0);
insert into chart_detail values (90,'2011-05',24557,1);
insert into chart_detail values (60,'2011-05',0,4);
insert into chart_detail values (30,'2011-05',0,0);
COMMIT;EXPECTED RESULTS:
2011-04 2011-05
DIS RPLC BLD TBLD IPTV RPLC BLD TBLD IPTV
30 1 0 37021 0.03 0 0 30271 0.00
60 7 0 37021 0.22 4 0 30271 0.13
90 9 0 37021 0.46 1 24557 30271 0.17
120 5 26449 37021 0.59 0 5714 5714 0.17
150 0 10572 10572 0.59 0
180 0 0
TOTAL 22 37021 5 30271 PROBLEM: I need to have a running total of IPTV like in the above example. I can get the IPTV for each DIS/bld_mo but I don't know how to get the running total of it. In the script below I just used an example where I tried summing the IPTV like was done for build. I know it can't be done that way because IPTV is a calculated field in the query but if I substitute "APR_IPTV" with the formula for IPTV I get an error that window functions aren't allowed here. I do not know a way around this. I commented out the bad piece of code.
PROBLEM SCRIPT:
WITH pivot_results AS
SELECT dis
, NVL (apr11_rep, 0) AS apr11_rep
, NVL (apr11_bld, 0) AS apr11_bld
, NVL ( SUM (apr11_bld)
OVER (ORDER BY dis DESC)
, 0
) AS apr11_tbld
, DECODE(NVL ( SUM (apr11_bld)
OVER (ORDER BY dis DESC)
, 0),0,0,ROUND(NVL(apr11_rep, 0)*1000/ NVL ( SUM (apr11_bld)
OVER (ORDER BY dis DESC)
, 0),2
)) AS apr11_iptv
, NVL ( SUM (apr11_iptv)
OVER (ORDER BY dis DESC)
, 0
) AS apr11_tiptv
, NVL (may11_rep, 0) AS may11_rep
, NVL (may11_bld, 0) AS may11_bld
, NVL ( SUM (may11_bld)
OVER (ORDER BY dis DESC)
, 0
) AS may11_tbld
, DECODE(NVL ( SUM (may11_bld)
OVER (ORDER BY dis DESC)
, 0),0,0,ROUND(NVL(may11_rep, 0)*1000/ NVL ( SUM (may11_bld)
OVER (ORDER BY dis DESC)
, 0),2
)) AS may11_iptv
, DECODE(NVL ( SUM (may11_bld)
OVER (ORDER BY dis DESC)
, 0),0,0,ROUND(NVL(may11_rep, 0)*1000/ NVL ( SUM (may11_bld)
OVER (ORDER BY dis DESC)
, 0),2
)) AS may11_tiptv
FROM chart_detail
PIVOT ( MAX (rplc) AS rep
, MAX (bld) AS bld
FOR bld_mo IN ( '2011-04' AS apr11
, '2011-05' AS may11
SELECT CASE
WHEN GROUPING (dis) = 0
THEN TO_CHAR (dis)
ELSE 'Total'
END AS dis
, SUM (apr11_rep) AS apr11_rep
, SUM (apr11_bld) AS apr11_bld
, SUM (apr11_tbld) AS apr11_tbld
, CASE
WHEN GROUPING (dis) = 0
THEN SUM (apr11_iptv)
END AS apr11_iptv
, SUM (apr11_tiptv) AS apr11_tiptv
, CASE
WHEN GROUPING (dis) = 0
THEN SUM (apr11_tpiptv)
END AS apr11_tiptv
, SUM (may11_rep) AS may11_rep
, SUM (may11_bld) AS may11_bld
, SUM (may11_tbld) AS may11_tbld
, CASE
WHEN GROUPING (dis) = 0
THEN SUM (may11_iptv)
END AS may11_iptv
FROM pivot_results
GROUP BY ROLLUP (dis)
ORDER BY pivot_results.dis
;Thank you,Hi,
So you know how to compute iptv for an individual row; the problem now is that you want to get a running total of iptv; is that it?
The problem there is that computing iptv requires an analytic function, and analytic functions can't be nested. To get the results of nesting f (g (x)), where f and g are analytic funtions, you have to compute g in a sub-query, and then use the results as the argument to f in a super-query.
Here's how to apply that to your situation:
WITH pivot_results AS
SELECT dis
-- April, 2011
, NVL (apr11_rep, 0) AS apr11_rep
, NVL (apr11_bld, 0) AS apr11_bld
, NVL ( SUM (apr11_bld)
OVER (ORDER BY dis DESC)
, 0
) AS apr11_tbld
, NVL ( 1000 * apr11_rep
/ NULLIF ( SUM (apr11_bld) OVER (ORDER BY dis DESC)
, 0
, 0
) AS apr11_iptv
-- May, 2011
, NVL (may11_rep, 0) AS may11_rep
, NVL (may11_bld, 0) AS may11_bld
, NVL ( SUM (may11_bld)
OVER (ORDER BY dis DESC)
, 0
) AS may11_tbld
, NVL ( 1000 * may11_rep
/ NULLIF ( SUM (may11_bld) OVER (ORDER BY dis DESC)
, 0
, 0
) AS may11_iptv
FROM chart_detail
PIVOT ( MAX (rplc) AS rep
, MAX (bld) AS bld
FOR bld_mo IN ( '2011-04' AS apr11
, '2011-05' AS may11
SELECT CASE
WHEN GROUPING (dis) = 0
THEN TO_CHAR (dis)
ELSE 'Total'
END AS dis
-- April 2011
, SUM (apr11_rep) AS apr11_rep
, SUM (apr11_bld) AS apr11_bld
, SUM (apr11_tbld) AS apr11_tbld
, CASE
WHEN GROUPING (dis) = 0
THEN ROUND ( SUM (SUM (apr11_iptv))
OVER (ORDER BY dis)
, 2
END AS apr11_iptv
-- May 2011
, SUM (may11_rep) AS may11_rep
, SUM (may11_bld) AS may11_bld
, SUM (may11_tbld) AS may11_tbld
, CASE
WHEN GROUPING (dis) = 0
THEN ROUND ( SUM (SUM (may11_iptv))
OVER (ORDER BY dis)
, 2
END AS may11_iptv
FROM pivot_results
GROUP BY ROLLUP (dis)
ORDER BY pivot_results.dis
;Output:
APR11 APR11 APR11 APR11 MAY11 MAY11 MAY11 MAY11
DIS _REP _BLD _TBLD _IPTV _REP _BLD _TBLD _IPTV
30 1 0 37021 .03 0 0 30271 .00
60 7 0 37021 .22 4 0 30271 .13
90 9 0 37021 .46 1 24557 30271 .17
120 5 26449 37021 .59 0 5714 5714 .17
150 0 10572 10572 .59 0 0 0 .17
Total 22 37021 158656 5 30271 96527As you can see, this is not quite what you wanted on the row where dis='150'. You asked for NULLS in the may11_rep, may11_bld and may11_iptv columns. You can get those results if you need them; just explain the rules that govern whether to display the values and when to display NULL.
The way you posted the sample data and results, and the quantity of sample data were all excellent; it really helped me find a solution. Thanks.
It would have also helped it you had explained how iptv is computed. Basically, iptv = 1000 * rep / tbld, right?
It looks like most of this code:
, DECODE(NVL ( SUM (may11_bld)
OVER (ORDER BY dis DESC)
, 0),0,0,ROUND(NVL(may11_rep, 0)*1000/ NVL ( SUM (may11_bld)
OVER (ORDER BY dis DESC)
, 0),2
)) AS may11_iptvwas a way of avoiding divide by 0 errors; it would have been helpful if you had explained that. -
Cumulative Key Figure (Running Total) - how to use in formula?
We have a scenario where I need to use the cumulative value of a Key Figure in a subsequent formula. The Cumulated property setting at the Key Figure level in the query is a Displayed Data Only setting, however, so the cumulated values are not available for use in a formula The individual values are used by BW as opposed to the cumulative values that are displayed in the column.
Ive tried using the Cumulated property at the characteristic level. I am then able to use the displayed cumulative values in a formula. However, I also need to display the individual (not cumulated) Key Figure values in a column. These individual values are no longer available for display if the Cumulated property is set at the Characteristic level.
I thought that the Define Cells functionality could possible be used, but there is only one Structure in the query, so the Define Cells functionality is unavailable. I could not think of a way to use a second structure in the rows, as the rows need to be dynamic (two characteristics, populated based on user input variables).
It may be possible to accomplish this requirement by adding a column using VBA in the SAPBEXonRefresh sub, but use of VBA is not a preferred option, as the query may be run in either the Excel Analyzer or the Web Analyzer.
The infoprovider does not contain a Key Figure field for Cumulative Volumes.
The scenario details:
Rows (Characteristics):
A: Plant (values based on user input variable)
B: Calendar day (values based on user input date variables for start & end dates)
So there is one row for each day within each plant.
Columns (Key Figures):
A: Cumulative Volume at Start of Period (uses user input date variable for start date, and Constant Value property. Hidden column.)
B: Daily Volume (for each day in the period defined by the user input variables for start and end dates)
C: Cumulative Volume at End of Each Day (formula, meant to be equal to the sum of the Cumulative Volume at start of period plus the total so far of the Daily volumes. In other words, equal to the sum of Column A plus the running total of Column B).
Does anyone out there have any more ideas on how to accomplish the required Cumulative Volume computation?Thanks for your reply Jurgen.
I've created a Global Calculated Key Figure (CKF), and have looked at and tried a number of settings in the Properties of this new CKF.
I have not yet been able to make this work for me.
The "Cumulated" property for a Global CKF is also a display-only property. The displayed running total is not used in any formula containing this CKF, only the individual values are used in the formula.
If I select the 'Enhance' option, where exception aggregation can be done as I think you suggested, I do not see a 'cumulated' option. If I select the 'Summation' option for 'Exception Aggregation', then the 'Reference Characteristic' pull-down is not available.
Is there a different 'Exception Aggregation' option I should be using for running totals at the calendar day level?
Or am I unclear on the concept of your suggestion?
Perhaps you're on a later version of BW that has more Exception Aggregation options? (We're on BW3.5)
Maybe you are looking for
-
Price of line item coming as zero in SA
Dear Friend We have a scheduling agreement with 6 materials, The vendor sent us the price amendments ( vendor sent us on 26.05.09) that happened from 1st February 2009. Thus we will send them a debit note to vendor. Can I give a price amendment in th
-
How to use Java Embedding activity, getting error
Below is a simple code where in I am just assigning input variable to output variable(of type long), using java embedding activity, and I am getting error in Java Embedding Activity step. <bpelx:exec name="Java_Embedding_1" language="java" version="1
-
Hi, When I select the selected rows in MULTISELECT mode but when i try to clear that by clearing selectedRowIndexTable it is not working. What should i do ? Regards, Manav
-
Odi 11g release 2 documentation
from where can i get odi11g release 2 developer's guide. Please give me the link to downloac documents on odi11g,release 2
-
Account is blocked by dunning run
Hi, after i have run dunning for customers and if i look into log i see that for some customers dunning didn't run. Account D 0000010900 is blocked by dunning run 20080820 82008. There is any transaction where i can block/unbloc customers for dunning