Graphing a RUNNING TOTAL on a line graph
So I'm having a lot of trouble putting my data on a chart. I have it all laid out here: files.me.com/redsteven1/glwk4v.numbers.zip
Whenever I try to graph it though I run into a whole host of problems. Namely, that I can't get the values to plot on the chart at all.
Not sure what the problem is... I select A2:G103... and I see the different series (for each Activity) show up in the legend, but nothing is plotted on the chart.
I know that much of the table is blank... that's because I'll be adding to it every day.
Ideally, the X-axis should be time/date.... May, June, July, and August can be the major tick marks. And the Y-axis would be number of hours spent on each activity.
To further complicate things, the chart should really be a running total of time spent on each activity... so if I spend an hour on Activity 1 each day for 3 days... then on the third day I should have a plot of 3 hours... not 1.
I know I didn't work things super well here... hopefully you can figure out what I mean by looking at the linked file : \
Thanks in advance.
I guess that line graph isn't the best one, I would use the Scatter one.
You can't chart your datas as they are at this time.
Every datas are date_time or duration values which can't be charted as is.
Here, I converted the dates from column A into strings
Then I added 6 columns in which I converted the durations into decimal hours.
The original columns are hidden.
The formula used to convert is a simple one.
In H2, I inserted :
=STRIPDURATION(B)*24
Fill to the right
Fill Down
to fill the other cells.
Yvan KOENIG (VALLAURIS, France) dimanche 22 mai 2011 21:26:18
Please :
Search for questions similar to your own before submitting them to the community
To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !
Similar Messages
-
Here is a sample of my data in an array collection ["Jan-08",
"Jan-08", "Jan-08", "Feb-08", "Feb-08", "Mar-08", "Mar-08"] What I
would like to do is create a running total/count that I could then
graph. I believe I would want to create another array collection
that looks like this [{month:"Jan-08", total:3}, {month:"Feb-08",
total:5}, {month:"Mar-08", total:7}] I could create a nice line
graph from this data.
Any thoughts on how to get started? I am pretty new to flex,
actionscript, and programming, so I appreciate your help.
-HunterDrobells I am certain our prepay
customer service team will be able to help with any tracking options possible
on your Mifi device. You can contact them directly at at 888-294-6804.
BryanS_VZW
Follow us at Twitter @vzwsupport -
Discoverer plus running totals
hi,
any help will be appreciated.
I use Oracle discoverer plus. recently I tried to build a running total (average) calculation using the template provided. I defined 10 previous observations for this purpose. discoverer performed the calculation but the problem is with the first 9 (in this case) observations of the new calculation, because it averaged the first first observation, than the first two, than the first three and so on. when you get to the tenth observation it becomes correct, but you can imagine it is problematic, especially the graphic presentation. if I could present the graph only from the tenth observation and on it would be an acceptable compromise. any other suggestions are welcome too.
Thanks.
Mark.Hi,
I am afraid it is not at all clear what you are trying to do here. If you think of your results as a table of data do you want your calculation to be the same for all rows, a group of rows, or a running calculation changing for each row. Any graphical representation must be based on this underlying data.
Rod West -
Item Transaction History Report - Calculation for creating 'Running Total'
Hello
Using Oracle Discoverer, we have written a report that pulls back all Inventory Transactions (by item number). This report lists both transactions IN (e.g. receipts into the store) and OUT (e.g. issues out from the store).
Our customer would like an additional column, to represent 'Running Total', to be added to the report. This column needs to capture the running 'On Hand Quantity' for the associated Item, as each transaction (both transactions IN and OUT of store) is displayed.
For example, if the initial/first transaction for an item was a Receipt of 500, then this column (on the first line) should display 500. If the second transaction for the item was an issue of 15, then this column (on the second line) should display 485. If the third transaction was for an issue of 50, then this column (on the third line) should display 435. If the fourth transaction was for a receipt of 20, then this column (on the fourth line) should display 455 etc etc
I'm not sure how I'd write a calculation to cater for this (within discoverer) - do you know if this is achievable? Any help would be much appreciated. This would be easy enough to do in Excel, but I'm a bit of a novice when it comes to discoverer(!)
Many thanks
RossHi,
You can generally do this type of calculation using analytic functions. You would partition by the item number and order by the transaction date in the analytic function. You can use SUM function (with an order by) to get a running total of a column in the report. You can SUM a calculation containing a CASE statement which changes the OUT transactions to a negative number. The SUM function will start at zero, so you then can use FIRST_VALUE function to get the first value for the item which you could then add to the totals.
Rod West -
Error when using running total variable in formula
This is probably an easy syntax problem, but I'm fairly new to Crystal reporting. I created a running total variable (count) called InquiryTypeSubtotal that simply counts the number of records. I have one grouping level, and in the group footer I'd like to print a line showing the total count for that group that looks like
Total inquiries for Assistive Technology: 3
To accomplish this I'm using a formula field with the following syntax:
"Total inquiries for " + {CnAttrCat_1.CnAttrCat_1_Description} + ": " + ToText(@InquiryTypeSubtotal)
When I try to check the formula, I get the error message "The ) is missing." What am I doing wrong?
Thanks,
AlecI put in the curly brackets so my formula now reads
"Total inquiries for " + {CnAttrCat_1.CnAttrCat_1_Description} + ": " + ToText({@InquiryTypeSubtotal})
Now when I check the formula I get the error message "This field name is not known."
Alec -
Oracle report running total Resseting balance
Dear All,
I am developing report on Oracle R12 fixed Assets, I have to calculate the running total for each asset.
In brief
Asset 1
cost Deprciation Adjusted Cost
50 - 2 48
48 -5 45
45 - 4 41
I achieved that by using
if :p_val is null then
:result := nvl(:cost,0)-nvl(:depriciation,0);
:P_val :='5';
return :result;
else
:result := nvl(:result,0)-nvl(:depriciation,0) ;
return :result;
end if;
working fine
But problem is when the next asset start on same report
Asset 2
cost Deprciation Adjusted Cost
100 5 36
it substracts the last total (running total of previous asset with depriciation which was 41 in this example).
Oracle Champs pl advice me how to solve this.
I really dont got any idea how to solve this.
thanksDear,
Thanks for your reply , in your reply what you said I tried this but in pl/sql I am not actually achieving the result. The balance is not resetting at next group if you give one accurate line it would be really helpfull.
thanks -
Running total across 2 grouping
Hi All
I have created a crystal report and i have 2 remaining issues that i just cant get around.
the report is basically about all the net stock position.
the report is based on a query..that links sales order to all target documents that originate from the sales orders, i.e...deliveries, invoices, returns, credit notes.
then i also brought in all the open purchase orders and the instock from the oitw
i then sumed up the lines so the sales order > Delivery > invoice > credit note > returns all shows in one line..and if there is a different unit of measure it will be another line for that sales order
the report is grouped:
per warehouse
per item
per Sales Order Num
per Item Unit of Measure
per Line Num
1st issue:
in the selection criteria if the sales order is closed but if one of the delivery notes is open it should bring in the "whole set" not just the the open deliverys linked to the sales order.
this is because the delivered quantities adds up to the net position of the stock.
2nd issue:
I have to work out a net postion
formula: net stock = Oitw.instock + PO - remaining qty on sales order
I got the sales order as a negative
i used a running total formula, but it does not work if the sales order has more then one unit of measure.
whileprintingrecords;
If onfirstrecord or previous({Command.SO No.})<>{Command.SO No.} then
numbervar remain_bal:= remain_bal + {@QTY}
i tried to add another if statement..but does not work
whileprintingrecords;
If onfirstrecord or previous({Command.SO No.})<>{Command.SO No.} then
If onfirstrecord or previous({Command.SO Uom)<>{Command.SO Uom.} then
numbervar remain_bal:= remain_bal + {@QTY}
any help will be gladly welcomed..
thank you all
JerushaHi Dave
Thank you very much for your feedback.
I have been using the base UoM, ie InvQty field.
my issues comes where i am grouping I am 1st grouping by sales order num, then by uom as the customer wants to see that as separate entries
Example:
SO Num Uom Qty InvQty
1 Bags 50 200
1 Bulk 100 100
This is the forumula for the running total:
If onfirstrecord or previous ({Command.SO No.}) <> ({Command.SO No.}) then
if ({Command.Doc Type}) = 'SO' then
SO := SO + {@QTY}
However when i "print" my total and add it to the footer.. it will show 200 instead of 300.
Thanks
Jerusha -
Oracle report running total Resetting balance on next group
Dear All,
I am developing report on Oracle R12 fixed Assets, I have to calculate the running total for each asset.
In brief
Asset 1
cost Deprciation Adjusted Cost
50 - 2 48
48 -5 45
45 - 4 41
I achieved that by using
if :p_val is null then
:result := nvl(:cost,0)-nvl(:depriciation,0);
:P_val :='5';
return :result;
else
:result := nvl(:result,0)-nvl(:depriciation,0) ;
return :result;
end if;
working fine
But problem is when the next asset start on same report
Asset 2
cost Deprciation Adjusted Cost
100 5 36
it substracts the last total (running total of previous asset with depriciation which was 41 in this example).
Oracle Champs pl advice me how to solve this.
I really dont got any idea how to solve this.
thanksDear,
Thanks for your reply , in your reply what you said I tried this but in pl/sql I am not actually achieving the result. The balance is not resetting at next group if you give one accurate line it would be really helpfull.
thanks -
Running totals in crystal designer
Hi all!
I want to create a report with running total, that accumulate Balance value for each page.
Total accumulate should be reseted on each new page.
I have a query for report: SELECT CardCode, CardName, Balance FROM OCRD.
And i want a running total for field "Balance" (this total should be reseted on each new page).
In Crystal Designer I create new Running Total Field (in the PageFooter section).
In the Editing Running Total window I fill the following sections:
1) Summary section. Field to summarize: "Command.balance". Type of summary: "sum".
2) Evaluate section. On change of field: "command.cardcode"
3) Reset section. I want to choose PageNumber in the field "on change of field". But there is no any special field in the section "Available tables and fields"
How to reset the running total on each new page?
Thanks in advanceHi all!
The problem can be solved with report formulas. Probably this information will be useful to somebody.
So, we have the following task: need to calculate subtotals on each page.
Let's look at the solution.
On the first step, create Formula fields:
1) InitPageSum field has formula:
WhilePrintingRecords; NumberVar PageSum := 0;
2) CalcPageSum field has formula:
WhilePrintingRecords;
numberVar PageSum := PageSum + {Command.LineTotal}; // I use command to get field-values from //database
numberVar PageSum
3) PageBalance field has the following formula:
WhilePrintingRecords; numberVar PageSum
On the second step we place formula-fields in report sections.
1) Variables initialization.
Insert section in PageHeader area (lets name this section PHa). Drag formula InitPageSum into PHa for zeroing PageSum for each page. Then suppress the section PHa.
2) Increasing subtotal on page.
Create additional section in Details area (Dc). Drag CalcPageSum formula-field on this section (Dc). PageSum variable will be increasing in each line. Suppress the section Dc.
3) Display results.
a) Insert additional section in PageFooter area (let's name it PFa). Drag PageBalance formula-field into this section (PFa). The section PFa should be displayed on each page of the report, except the last page. The formula is:
if PageNumber <> TotalPageCount then true else false.
b) Insert additional section in ReportFooter area (let's name it RFa) and make this section the first section of the Report Footer area. Drag PageBalance formula-field into the section RFa. The section RFa should be displayed on the last page only. So, for the Suppress property of this section, create the formula:
if PageNumber = TotalPageCount then true else false
We make this adjustment (additional section in report footer area) because we need subtotals directly under the report (and not at the bottom of the page)
Best regards,
Katrine -
How to create a running total formula for different calendar years
Hello everyone,
I am looking for some help in creating a running total formula for different calendar years in Oracle. This is what I currently have organized in the crosstab report: vertically I have the cities from our database organized, then horizontially have the following information for each city:
2006 /2007 /2008
Amount /Amount Spent /Unspent Amount Amount Recieved/Amount Spent /Unspent Amount Amount Recieved/Amount Spent/Unspent Amount
Recieved
I am trying to create a formula that will specify each calendar year. For example, I'd like to have a formula in 2007 which would total the: 2007= {2006 unspent amount + the unspent amount in 2007} and same for 2008= {2007 unspent amount + the unspent amount in 2008}. I hope this is clear, I have simplified the report into a basic interpretation of what i've been trying to accomplish.
Would anybody know if this is possible and how to approach this?
Really appreciate it! Thanks.
AlexHi,
you can try and define a running total as a calculation in the crosstab as:
sum(Unspent Amount) over (partition by city order by year)
i find the crosstab format comfusing sometime since the aggregation is auto applied.
I would start with a flat table and then "duplicate is as a cross tab"
for your running total you can sort the data by the city,year and get it to 3 lines for each city, for example:
city year Unspent Amount all other amount...
X 2007 10
X 2008 20
X 2009 30
Y 2007 5
Y 2008 15
Y 2009 25
then you can use a funtion to calculate the amount :
sum(Unspent Amount) over (partition by city order by year)
this is the sql i used just to check it:
SELECT city,year,"Unspent Amount"
,SUM("Unspent Amount") over (PARTITION BY city ORDER BY YEAR)
FROM (
SELECT 'X' city, 2007 YEAR, 10 "Unspent Amount" FROM dual UNION ALL
SELECT 'X', 2008 ,20 FROM dual UNION ALL
SELECT 'X', 2009 , 30 FROM dual UNION ALL
SELECT 'Y', 2007 , 5 FROM dual UNION ALL
SELECT 'Y', 2008 , 15 FROM dual UNION ALL
SELECT 'Y', 2009 , 25 FROM dual
Tamir -
Cumulative Balance Running Total
Hello community,
i am doing a business partner Account balance report, i have already successfully fetch my data in to crystal reports as well as the running total for the cumulative balance, my problem is i have a duplicated rows in debit side, now how will i say to crystal reports (in Formula expression) that the 1st line if duplicated will the only one to be evaluated. for more detail please see image below
http://i264.photobucket.com/albums/ii184/abing430/CRDuplicatedRows.png
http://i264.photobucket.com/albums/ii184/abing430/CRDuplicatedRows-1.png
please help.
best regards,
Fidelhello sharonamt,
thanks for the response.
//Head
Shared NumberVar OB := {Command.Open Balance}
//Line
shared numbervar OB;
OB := OB + {BP_AccountBalance;1.Credit} - {BP_AccountBalance;1.Debit}
//Footer
Shared numbervar OB
i have this ff. formula the header is put in the page header, the line is put ing Group Footer section and the footer is put in report footer section. my group is grouped by Ref field w/c is unique in this report.
the duplicated rows is eliminated since i put my line formula in the group footer. but using the ff. formula's the report is ok, the results is fine on the first page only, because in the second page it will get the OB balance which is in the page header of the report., i dont needt to reset my running total.
thanks.
please help
best regards.
EDIT:
i have manage to figure out my problem... i just use this formula and it works.
whileprintingrecords;
if pagenumber = 1 then Shared NumberVar OB := {OpeningBalance.Open Balance}
else
0
since im having problem with reseting of the openingbalance, i had trap the page numvber and never reset the running total. this formula works for me as of now.
Fidel
Edited by: Avelino Fidel on Jan 24, 2011 2:46 PM -
Hi,
We are running report S_ALR_87013620 for a particular cost centre. When the total on the front screen for commitments is more than the total of the line items it displays.
Any idea's???Resolved using RKACOR04,
-
Post Author: bahamaER
CA Forum: Crystal Reports
Hello, I have been reviewing threads for running totals and would like some assistance on creating a running total for a group with a condition that will display in the group header, the running total should also reset for each group. Is this possible?
I know that there are some constraints such as the variable being reset to 0 in the header for each group as well as the group records have not been rendered when the header formulas are being assessed. I have been able to accomplish the task of running totals with conditions for groups using a running total field and also 3 separate formulas placed in the group header, detail and footer. The display is only correct in the group footer; my goal is to have the footer formula in the group header. Any ideas? I am currently using CR 8.5 but will be upgrading to CR 2008.
ThankyouHi,
If you are trying to calculate Total and display it in Group Header for field value placed in Detail, then you will get incorrect/no value for total, as Crystal Reports prints/processes the report line by line and it will not be able to process the Total for field in Detail section in Group Header.
Its is by Design.
For a workaround:
- Insert the same probematic report (Say A.rpt) as a Subreport in Group Header of this report(Say A.rpt).(Say in GroupHeader A1) and link the Main Report to the
- Insert Section Below (Say GroupHeader A2)
- Calculate Total in Section Group Header A2)
This workaround will reduce the Performance of the report as Subreport will be proceed for each Group Value.
Regards,
Kiran -
Dear all,
I am creating a new report which needs a conditional running total.
I need to sum the credits quantity if the following condtions are met
line_type="S" and
line_no<3
I used running total like this
Field to summarize: lab_credits2.credit_qty
Type of Summary: SUM
Evaluate: Use formula
{lab_credits2.line_type}="S" and
{lab_credits2.line_no}<3;
Reset: On change of group (Reason Code).
When I ran the report, it did not produce the right results, so I placed the line type and line no into the same Group footer and ran the report.
I found out that the report is not filtering the linetype and line no.
Result shows
Line Type ="S" - 100 - Line number =1
Line Type = "M" - 200 - Line number=6
and so on.
The report is grouped by Reason Code.
Any ideas why would it not be filtering the records?
Report Record Selection Code
{lab_credits.credit_date}>={?startdate} and
{lab_credits.credit_date}<={?enddate} and
{lab_credits.credit_status} = 2;
Status=2 is needed there to filter the Order numbers correctly.
Many thanks
Regards
JehanzebThanks James,
I have put all three in detail and used the filteration and it worked under detail section however the results when used in total SUM is produced incorrectly.
I suspect it might be of database table linkage? or maybe I have done something wrong in the report.
I am going to create another report and see if that works.
Will post info here.
Regards
Jehanzeb
Edited by: Jehanzeb Navid on Sep 4, 2008 11:55 AM
Right I found the issue however I don't know how to resolve it.
I have 4 tables in the database
1: Lab Credits - Order_num, Credit_status, Reason_code
2: Lab Credits2 - Order_num, Line_no, Line_type, Credit_qty
3: Lab Reasons - Reason_code,Reason_description
4: Oetrn2 - Order_num
This is how they are linked up
Lab_Credits_Order_num = Lab_credits2_order_num and oetrn2_order_num
Lab_Credits_Reason_code = lab_reasons_reason_Code
Report Grouping
Grouped by Reason Code
Date range - month to date
Report Record Selection
{lab_credits.credit_date} in monthtodate and
{lab_credits2.line_no}<3 and
{lab_credits2.line_type}="S" and
{lab_credits.credit_status}=2;
Now the issue
When I add sum of qty of lab_credits2_credit_qty into the report Group footer,it produces the right results However when I add
DistinctCount of Oetrn2_Order_num into the Group footer, it creates totally different Sum of Lab Credit Qty results. (Please note: The oetrn2_order_num results appear fine, however they messup Sum of Lab_credit_credit_qty).
What do you think where am I doing wrong?
It has to be something to do with table linkage.
Regards
Jehanzeb -
Hey,
I may be having a brain freeze. I need to print a running total (max) above the detail lines of a report. Since the running total is not known until after the detail lines, is there a way to do this? I'm stuck and frustrated. Thanks,
JimI'm starting to think I am going about this in the wrong way. My report has a field named 'tolerance' which is on every other record but does not appear in the report detail. It is the same value for every record in the group. I need to capture the value and display it in the group header. I was attempting to do a max() running total, and the field looked fine in the group footer, but when I copied it to the group header to changed to blank.
I think there must be a simpler way to do this, but I don't know what it is. Thanks for your help,
Jim
Maybe you are looking for
-
Error in manual database creation in 10g for windows.
hi, i have planned to create database manually in window command prompt by the following steps but i m getting this error, so guys provide me some idea to create db. D:\oracle\product\10.1.0\Db_1>set oracle_sid=god; D:\oracle\product\10.1.0\Db_1>orad
-
IBooks Author How to make timeline interactive images?
Dear iBooks team Can someone give me some clues and advices on how to do it? Does it need an HTML widget? Image in the Annex I need to know what software to use to create this interactive image, it is best tutorial. Thanks
-
Adobe Acrobat form can be opened in Adobe Reader but no one can fill it out. Why not?
So I created a form for my job that my co-workers and clients need to be able to fill out. It was created in Acrobat and while others can open it in their Adobe Reader they are unable to edit any of the fields/fill the form out. Any ideas what might
-
Oracle 10g EE Export Results in ORA-01001: invalid cursor Error
Hi, I'm quite new to Oracle 10g and OCS10g. We have a crippled/corrupt SYSAUX tablespace (data file 3) which cannot be recovered using recover command anymore. So metalink support instructed us to do a export of the metadata of the working tablespace
-
HP mini 110 System Recovey Options
I have the HP mini 110 i am trying to recover windows 7 it comes to a screen saying: System Recovery Options To access recovery options, log on as a local user To access the command prompt as well, log on using administrator account, User name: HomeG