Count and Sum running total

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.

Similar Messages

  • COUNT() and SUM() function it not working in XDO file.

    Hi ,
    I am getting one error. Count and sum function not working proper.
    For example :
    Department 10 have 3 employee and total salary is 8750. But my report returning total employee 1 and total salary 5000
    10
    Ename Sal
    KING 5000
    CLARK 2450
    MILLER 1300
    ==================
    total employee : 1
    total salary : 5000
    Kindly help me solve this problem.
    <dataTemplate name="TEXT">
    <properties>
    <property value="upper" name="xml_tag_case" />
    </properties>
    <lexicals>
    </lexicals>
    <dataQuery>
    <sqlstatement name="Q_TEMP">
    <![CDATA[SELECT DEPTNO,DNAME,LOC FROM DEPT]]>
    </sqlstatement>
    <sqlstatement name="Q_TEMP1">
    <![CDATA[SELECT ENAME,HIREDATE,SAL FROM EMP WHERE DEPTNO = :DEPTNO]]>
    </sqlstatement>
    </dataQuery>
    <datastructure>
    <GROUP name="G_1" source="Q_TEMP">
    <element value="DEPTNO" name="DEPTNO" />
    <element value="DNAME" name="DNAME" />
    <element value="LOC" name="LOC" />
    <GROUP name="G_2" source="Q_TEMP1">
    <element value="ENAME" name="ENAME" />
    <element value="SAL" name="SAL" />
    <element value="G_2.ENAME" name="TOTL_DETAILS" dataType="number" function="COUNT()" />
    <element value="G_2.SAL" name="TOTL_SAL" function="SUM()"/>
    </GROUP>
    </GROUP>
    </datastructure>
    </dataTemplate>
    Thanks
    Yudhi

    Please have the data structure as below:
    <datastructure>
    <GROUP name="G_1" source="Q_TEMP">
    <element value="DEPTNO" name="DEPTNO" />
    <element value="DNAME" name="DNAME" />
    <element value="LOC" name="LOC" />
    <GROUP name="G_2" source="Q_TEMP1">
    <element value="ENAME" name="ENAME" />
    <element value="SAL" name="SAL" />
    *</GROUP>*
    *<element value="G_2.ENAME" name="TOTL_DETAILS" dataType="number" function="COUNT()" />*
    *<element value="G_2.SAL" name="TOTL_SAL" function="SUM()"/>*
    *</GROUP>*
    </datastructure>
    Aggregate functions to be placed at the level you require it. Here you need at G_1, so place it there.

  • Help with count and sum query

    Hi I am using oracle 10g. Trying to aggregate duplicate count records. I have so far:
    SELECT 'ST' LEDGER,
    CASE
    WHEN c.Category = 'E' THEN 'Headcount Exempt'
    ELSE 'Headcount Non-Exempt'
    END
    ACCOUNTS,
    CASE WHEN a.COMPANY = 'ZEE' THEN 'OH' ELSE 'NA' END MARKET,
    'MARCH_12' AS PERIOD,
    COUNT (a.empl_id) head_count
    FROM essbase.employee_pubinfo a
    LEFT OUTER JOIN MMS_DIST_COPY b
    ON a.cost_ctr = TRIM (b.bu)
    INNER JOIN MMS_GL_PAY_GROUPS c
    ON a.pay_group = c.group_code
    WHERE a.employee_status IN ('A', 'L', 'P', 'S')
    AND FISCAL_YEAR = '2012'
    AND FISCAL_MONTH = 'MARCH'
    GROUP BY a.company,
    b.district,
    a.cost_ctr,
    c.category,
    a.fiscal_month,
    a.fiscal_year;
    which gives me same rows with different head_counts. I am trying to combine the same rows as a total (one record). Do I use a subquery?

    Hi,
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    user610131 wrote:
    ... which gives me same rows with different head_counts.If they have different head_counts, then the rows are not the same.
    I am trying to combine the same rows as a total (one record). Do I use a subquery?Maybe. It's more likely that you need a different GROUP BY clause, since the GROUP BY clause determines how many rows of output there will be. I'll be able to say more after you post the sample data, results, and explanation.
    You may want both a sub-query and a different GROUP BY clause. For example:
    WITH    got_group_by_columns     AS
         SELECT  a.empl_id
         ,     CASE
                        WHEN  c.category = 'E'
                  THEN  'Headcount Exempt'
                        ELSE  'Headcount Non-Exempt'
                END          AS accounts
         ,       CASE
                        WHEN a.company = 'ZEE'
                        THEN 'OH'
                        ELSE 'NA'
                END          AS market
         FROM              essbase.employee_pubinfo a
         LEFT OUTER JOIN  mms_dist_copy             b  ON   a.cost_ctr     = TRIM (b.bu)
         INNER JOIN       mms_gl_pay_groups        c  ON   a.pay_group      = c.group_code
         WHERE     a.employee_status     IN ('A', 'L', 'P', 'S')
         AND        fiscal_year           = '2012'
         AND        fiscal_month          = 'MARCH'
    SELECT    'ST'               AS ledger
    ,       accounts
    ,       market
    ,       'MARCH_12'          AS period
    ,       COUNT (empl_id)       AS head_count
    FROM       got_group_by_columns
    GROUP BY  accounts
    ,            market
    ;But that's just a wild guess.
    You said you wanted "Help with count and sum". I see the COUNT, but what do you want with SUM? No doubt this will be clearer after you post the sample data and results.
    Edited by: Frank Kulash on Apr 4, 2012 5:31 PM

  • Calculating 60 days from last run date and sum a total for those 60 days

    I need to calculate 60 days from last run date (I will create prompts), then take that number to sum a total of items.
    Can someone be of assistance.

    Hi,
    You can create a calculation to calculate 60 days before your run date. e.g. if rundate is your date item then the calculation will be:
    rundate-60
    Rod West

  • How can I obtain a summary report from webi through counts and sum

    I have a report built from webi. But will like to count the report by different categories.

    Hi Cobimah,
    You have several options. You can simply add totals to the measure columns where you want a count or sum. Click on the column and then click the Sum button on the menu and you can count, sum, min, max, etc.
    If you want a separate summary report, you can place formulas in the cells like =Sum([Measure Object]) or Count([Measure Object]), or create a variable as the same and place it in the cell.
    You also have the option of creating the pre-aggregated objects in the Universe and then they are already there for you to use where you like if they are aggregations that you will be using often.
    Thanks

  • 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          7

    I 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

  • Count and sum function

    Hi,
    I want to get sum of a column, but it is giving wrong values when using sum and count functions. please help.
    But in actual excel value is different.

    Hi,
    Below is the derived table query:
    select location,
    SUM(case when priority='1'and sholders like '%niit%'then 1 else 0 end) as 'Total P1callsof NIIT',
    SUM(case when Priority='1'and sholders like '%niit%'and sla_violation=0 then 1 else 0 end) as 'TotalResolvedcallsinBHRS NIIT'
    from Stakeholders group by Location
    Am calculating the sum of 'Total P1callsof NIIT' in a summary page, which gives me incorrect value(2349) where the actual count is 581. .

  • MDX How to get total distict count and SUM of subgroups?

    with
    MEMBER Measures.[EmailCount] as IIF(ISEMPTY([Measures].[Tran Count]), 0 ,[Measures].[Tran Count])
    MEMBER Measures.AdvGroupTotal as
    SUM (
    FILTER( EXISTING ([Dim IFA Details].[Parent Key].[Adviser Group].Members * [Dim Date].[Fiscal].[Fiscal Year].members )
    , Measures.[Amount] > 100 )
    , Measures.[Amount])
    MEMBER Measures.[AdvGrpCount] as
    distinctCOUNT(Existing([Dim IFA Details].[Parent Key].[Adviser Group].Members * [Dim Date].[Fiscal].[Fiscal Year].members))
    member Measures.IncomePerEmail as Measures.AdvGroupTotal /Measures.[EmailCount]
    member Measures.AvgIncomePerFirm as Measures.AdvGroupTotal/ Measures.AdvGrpCount
    SELECT { [Measures].[Amount] , Measures.[EmailCount], Measures.AdvGroupTotal, Measures.[AdvGrpCount],
    Measures.IncomePerEmail, Measures.AvgIncomePerFirm }
    ON COLUMNS,
    [Dim Date].[Fiscal Year].[Fiscal Year].ALLMEMBERS * [Dim Date].[Fiscal Quarter].[Fiscal Quarter].ALLMEMBERS *
    Except( [Dim Income Range].[Hierarchy].[Range ID].Members , [Dim Income Range].[Hierarchy].[All].UNKNOWNMEMBER.UNKNOWNMEMBER )
    on rows
    FROM [Income and Emails Cube]
    where
    [Dim Date].[Fiscal].[Fiscal Year].&[FY 13/14]
    The query above returns :
    How can I get Totals for AdvGroupTotal and AdvGroupCount for the year ?
    In the above case I want to tally up 1586 + 67 + 155 + 12 + 1718 for AdvGroupCount, same applies for the corresponding
    AdvGroupTotal figures.
    Seems simple enough, but I seem unable to come up with a way around this.
    Jon

    I worked it out with the help of Simon from another forum.
    Using a filtered set will get me the result required. It is however not very quick, so I probably should look into building it into the cube.
    WITH SET [Filtered Groups] AS
    ( Filter (
    { [Dim IFA Details].[Parent Key].[Adviser Group] } *
    { [Dim Date].[Fiscal Year].CurrentMember },
    [Measures].[Amount] > 100
    MEMBER [Measures].[Annual] AS
    Sum ( [Filtered Groups], Measures.[Amount] )
    MEMBER [Measures].[Firm Count] AS
    DistinctCount ( [Filtered Groups] )
    MEMBER [Measures].[Avg Income Per Firm] AS
    [Measures].[Annual] / [Measures].[Firm Count]
    MEMBER [Measures].[Test] AS
    Sum (
    { [Dim Date].[Fiscal Quarter].[Fiscal Quarter] } * { [Dim Income Range].[Hierarchy].[Range ID] } * { [Filtered Groups] },
    [Measures].[Amount]
    MEMBER [Measures].[TotalCount] AS
    DistinctCount (
    { [Dim Income Range].[Hierarchy].[Range ID] } * { [Filtered Groups] }
    MEMBER [Measures].[TotalAvg] as [Measures].[Test]/ [Measures].[TotalCount]
    MEMBER [Measures].[Quarter] as [Measures].[Amount]
    SELECT
    { [Measures].[Quarter], [Measures].[Annual], [Measures].[Firm Count], [Measures].[Avg Income Per Firm],
    [Measures].[Test], [Measures].[TotalCount], [Measures].[TotalAvg] } ON COLUMNS,
    [Dim Date].[Fiscal Year].[Fiscal Year].AllMembers * [Dim Date].[Fiscal Quarter].[Fiscal Quarter].AllMembers *
    Except ( [Dim Income Range].[Hierarchy].[Range ID].Members, [Dim Income Range].[Hierarchy].[All].UnknownMember.UnknownMember )
    DIMENSION PROPERTIES Member_Unique_Name, MEMBER_CAPTION
    ON ROWS
    FROM [Income and Emails Cube]
    WHERE [Dim Date].[Fiscal].[Fiscal Year].&[FY 13/14]

  • Count and Sum show different in Summary tab

    Hello friends,
    Webi 4 version
    I have a webi dcument with 4 report tabs. Summary, Expense,Revenue and Forecasting.
    I have a SUM value in Expense tab and Revenue tab. I also have Count value in Forecasing.When I copy these SUM and Count values to Summary tab, they show different values than those in other tabs.
    Please help me to resolve this
    Thanks
    Renpal

    Hi Renpal,
    Even if we write the aggregate values in to a variable and if you copy that variable in Summary tab it may not give the same result.For Example.
    If count of Sales orders in Detail tab is showing as 500 and in Summary tab it may show as 489. This is because in Detail tab there might be some cells which are "#" or Not assigned. so due to granularity it will count each and every cell, incase of summary all # or Not Assigned are calculated as 1.
    Can you check wrt the above example where exactly the data is not matching.
    Regards,
    G.SaiNath

  • Use Windows PowerShell to count and list total number of items in Folders E-Mail in Office Outlook?

    I have the need to generate a list of all outlook folders and the total number of items listed beside each folder name. I thought I could simply modify the script from " http://blogs.technet.com/b/heyscriptingguy/archive/2009/01/26/how-do-i-use-windows-powershell-to-work-with-junk-e-mail-in-office-outlook.aspx
    " regarding the total number of items in the junk folder but no luck.
    I thought I could just simply duplicate line 6 of the aforementioned script
    "$folder = $namespace.getDefaultFolder($olFolders::olFolderJunk) " and change the folder name but getting the "Method invocation failed because [Microsoft.Office.Interop.Outlook.OlDefaultFolders] does not contain a method
    named 'olFolder'.
    At line:7 char:1
    + $folder = $namespace.getCurrentFolder($olFolders::olFolder("Design Engineering S ...
    I've found a way to export a list of all these folders using exportoutlookfolders.vbs to a txt file but doesn't include total number of items.
    Looking for any pointers on how to make this work. Don't expect anyone to write it for me but I am still learning PS. Would be great to find a way to import all of these folder and subfolder names into the script. Will be appreciative of any advice though.
    There's an enormous amount of Outlook folders.
    Outlook 2013
    Windows 8
    Thanks,
    Barry

    Since I am not and administrator, but an end user, I do not have access to the Get-Mailxxxx commandlets to make this really easy and had to do this long hand.
      The following will pull folder.name, folder.items.count, and sum the total size of each folder's items for all folders and their subs. 
    Just one warning, the summation can take some time with a large PST file since it needs to read every email in the PST. 
    There is also some minor formatting added to make the results a little more readable.
    $o
    = new-object
    -comobject outlook.application 
    $n
    = $o.GetNamespace("MAPI") 
    $f
    = $n.GetDefaultFolder(6).Parent 
    $i
    = 0
    $folder
    = $f
    # Create a function that can be used and then re used to find your folders
    Function
    Get-Folders()
    {Param($folder)
     foreach($folder
    in $folder.Folders)   
    {$Size =
    0
    $Itemcount
    = 0
    $foldername
    = $folder.name
    #Pull the number of items in the folder
    $folderItemCount
    = $folder.items.count
    #Sum the item (email) sizes up to give the total size of the folder
    foreach ($item
    in $folder.Items)
    {$Itemcount
    = $Itemcount
    + 1
    $Size =
    $Size +
    $item.size
    Write-Progress -Activity ("Toting size of "
    + $foldername
    + " folder.")
    -Status ("Totaling size of "
    + $Itemcount
    + " of "
    + $folderItemCount
    + " emails.")
    -PercentComplete ($itemcount/$folderItemCount*100)
    # just a little formating of the folder name for ease of display
    While($foldername.length
    -le 19){$foldername
    = $foldername
    + " "}
    #Write the results to the window
    Write-Host ("-folder "
    + $foldername
    + "  
    -itemcount " +
    "{0,7:N0}" -f
    $folderItemCount +
    "   -size " +
    "{0,8:N0}" -f ($size/1024)
    + " KB")
    #If the folder has a sub folder then loop threw the Get-Folders function.
    #This two lines of code is what allows you to find all sub folders, and
    #sub sub folders, and sub sub sub for as many times as is needed.
    If($folder.folders.count
    -gt 0)
    {Get-Folders($folder)}
    get-folders($folder)

  • Running total and Next function in Crosstab

    <strong><font size="3"><font face="Times New Roman">Clarifications on getting Next Running sum and count on a Crosstab</font></font></strong><font face="Times New Roman" size="3"> </font> <p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Here is the example, which I am working on:</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Highlights of the Report:</font></p><p style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; tab-stops: list .5in" class="MsoNormal"><font face="Times New Roman"><span><font size="3">-</font><span style="font: 7pt &#39;Times New Roman&#39;">         </span></span><font size="3">Report is grouped on {Scenario Name}</font></font></p><p style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; tab-stops: list .5in" class="MsoNormal"><font face="Times New Roman"><span><font size="3">-</font><span style="font: 7pt &#39;Times New Roman&#39;">         </span></span><font size="3">Left side dates on any of the tables is {Version Date}</font></font></p><p style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; tab-stops: list .5in" class="MsoNormal"><font face="Times New Roman"><span><font size="3">-</font><span style="font: 7pt &#39;Times New Roman&#39;">         </span></span><font size="3">Dates on the top header on any of the tables is {Fsc Week End Dt}</font></font></p><p style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; tab-stops: list .5in" class="MsoNormal"><font face="Times New Roman"><span><font size="3">-</font><span style="font: 7pt &#39;Times New Roman&#39;">         </span></span><font size="3">Other formulae used in this report are:</font></font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">1) = ({Query1.Demand Qty})/100000</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Numerical values displayed in the "Original values" table.</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">2) =</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">if {Query1.Scenario Name} = &#39;DLYPRD:ASCP-PRD:PRD&#39; </font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">THEN mid ({Query1.Scenario Name},13,3)</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">ELSE mid ({Query1.Scenario Name},13,6)</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Second column with value PRD in any of the tables.</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">3) {next qty} = if not onlastrecord then next({@ShortDemandQty}) else 0;</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">(used in the "next values vertically" table)</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">4) - running total to calculate horizontally</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Evaluate - For each record</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Reset - On change of field: {Version Date}</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">5) - running total to calculate vertically.</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Evaluate - For each record</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Reset - On change of field: {Fsc Week End Dt}</font></p><font face="Times New Roman" size="3"> </font> <p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">In this report design, when I go and change the Sort order in the Record Sort Expert, some of the values go for a toss. I got two cases where the vertical values are correct in one case and horizontal values are correct in another case.</font></p><font face="Times New Roman" size="3"> </font><strong><font size="3"><font face="Times New Roman">First Case:</font></font></strong> <p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Cumulative vertical values are correct.</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal">&#160;</p><font face="Times New Roman" size="3"> </font><strong><font size="3"><font face="Times New Roman">Second Case:</font></font></strong> <p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Cumulative horizontal values are correct.</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal">&#160;</p><font face="Times New Roman" size="3"> </font><strong><span style="color: blue"><font size="3"><font face="Times New Roman">Is there any way to consistisize both the horizontal and vertical running totals. I even tried forcing the evaluate & reset like below and clearing the record sort order, but it did not work:</font></font></span></strong><strong><span style="color: blue"><font face="Times New Roman" size="3"> </font></span></strong> <p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">1) - running total to calculate horizontally</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Evaluate - On change of field: {Fsc Week End Dt}</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Reset - On change of field: {Version Date}</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">2) - running total to calculate vertically.</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Evaluate - On change of field: {Version Date}</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Reset - On change of field: {Fsc Week End Dt}</font></p><font face="Times New Roman" size="3"> </font><strong><span style="color: blue"><font size="3"><font face="Times New Roman">And one more observation on the running total, how it works in the crosstab is, the total runs likes a spiral rather than resetting at the column or row level. Is there any way to restrict this?</font></font></span></strong><font face="Times New Roman" size="3"> </font> <p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">3) {next qty} = if not onlastrecord then next({@ShortDemandQty}) else 0;</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">(used in the "next values vertically" table)</font></p><font face="Times New Roman" size="3"> </font> <p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">For example, onlastrecord does not seem to work on the "next values vertically" crosstab, rather brings the record from the next column.</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">For 3/7/2007 - 01/APR/07, the value is 157.84 which is incorrect and should be 0.</font></p><strong><span style="color: blue"><font size="3"><font face="Times New Roman">I need to get a next on the running total. Next (fld) doesnot work for running totals. Please guide me, how to get the next values for the running total fields.</font></font></span></strong>

    Post Author: redtop6683
    CA Forum: Formula
    Whoops I guess I should have mentioned that I've already tried using Sum and Round(Running Total, 2) and haven't had any luck.
    I also should have mentioned that Groupings 1 and 2 are sums, and that Running Total is a running total that changes on every change of the grouping.  There are 4 groupings.
    Grouping 1 (Employee Name)
    Grouping 1.1 (Shift)
    Grouping 1.2.1 (Payroll Department Code)
    Grouping 1.2.1.1 (Description)
    Below these 4 groupings is where the running total is.  The issue is that in the footer of grouping 1 is a field that sums the elapsed hours for the particular employee by each payroll department code, these are then summed using the running total.  The issue is as stated in the earler post that I can round these individual sums on the groupings, but I get the number on my running total to round differently as you can see by the earlier post's example.
    Thanks for the help.
    ~Jason

  • 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

  • Running Total Issue:  How to calculate counts excluding suppressed records

    Post Author: benny
    CA Forum: Formula
    Hello All:
    I have a current report that gives the total counts of work requests.   However, in my section expert, there are some records in the detail that are suppressed (if there isn't any backlog). The current running totals are counting all the records including the suppressed records. I think I need three formulas:1. Calculate the counts2. Calculate the counts excluding suppressed records3. Reseting the counts by group
    May I ask if someone can give me an example of what I should do?
    Thanks so much!
    Benny

    Post Author: benny
    CA Forum: Formula
    Bettername,
    Actually, I should have been more specific.  This report is actually a PM backlog report.  It displays all the work requests (PM) issued including the backlogged. There are 9 columns (including one called Backlog) for the different counts of the pm's based from the status codes (Issued, Material on Order, Completed, Cancelled, etc) of the work requests. The detail records of worke requests are grouped by shop and PM end date.  The running totals are calculated at the pm date group level (group footer#2). Then based from those at the shop group level (group footer#1) there is a grand total of counts of the running totals. The detail records and pm end date group header (group header #2) are suppressed.
    Now the foremen would like the report to just display all the backlogged PMs. Using the section expert, I suppressed all the PM issued that have no back log ({@ backlog = 0}) and just display the back logged pm's.  This is where I run into the running total issue.
    This is very involved report and I will use the column PM Issued as an example.  I can still use the same logic as you suggested?
    1. declaration formula:
    whileprintingrecords;numbervar pmissued := 0;
    2. Suppression formula that uses the variable:
    whileprintingrecords;
    numbervar pmissued;
    if ({@ backlog = 0}) then pmissued:= pmissed else pmissued:=pmissuedr+1
    3. Display formula:whileprintingrecords;
    numbervar pmissued;
    If this is the right track, then I can use the same example for the other columns. 
    Thanks so much.
    Benny

  • How do I use a running total within a selection formula?

    I am developing a report within Crystal Reports 2008.  My goal is to identify any accounts that have zero usage for at least six months in this current year.  I have account number, meter size, read date, usage, and a running total/subtotal by account.
    Here is what the data looks like in the report
    ACCTNO     METER SIZE   READ DATE/TIME               READ_USAGE    Counter
    001022-05                    
    001022-05     2.00              9/28/2009  9:42:00 AM      0.00                     1
                                                                                    1
    001110-09               
    001110-09     2.00             3/2/2009  9:54:13 AM         0.00                      1
    001110-09     2.00             3/26/2009  1:32:28 PM        0.00                      1
    001110-09     2.00             4/27/2009  11:02:11 AM     0.00                      1
    001110-09     2.00             5/27/2009  1:13:53 PM        0.00                      1
    001110-09     2.00             6/19/2009  11:41:20 AM     0.00                      1
    001110-09     2.00     9/1/2009  8:13:25 AM         0.00                      1
                                                                                    6
    My report shows all accounts that have zero usage.  I want to filter the report to only show the accounts that have at least six zero usage reads.  I thought I could add a running total, sum it, and filter the data by using the selection formulas.  Unfortunately I keep getting an error message saying "this field cannot be used becuase it is being evaluated later."  Any help would be appreciated.  This is the first report I have created using crystal.
    Edited by: smwdrw2 on Oct 28, 2009 4:29 PM

    You could Conditionally suppress the account numbers where your running total is less than 6
    You will probably have to put your account number summaries in the group footer, instead of the header.
    Then:
    go to the section expert, click on the group footer for the account number, on the right, next to the word "Suppress" click on the box that says "X-2". In the formula put
    IF<6 then True
    Save and close
    The only way this would not work for you is if you have some sort of grand total that you don't want to include the other groups in.

  • Running total required but with different timing

    Hi All:
    I am using Oracle9i Enterprise Edition Release 9.2.0.6.0
    I want to write a query to display the statistics report with running total.
    I have written following query that return last 60 minutes activities.
    SELECT se.tserv_id,
    sum(decode(eu.category,'I',1,0)) Imp,
    sum(decode(eu.category,'E',1,0)) Exp,
    count(*) Total
    FROM service_events se, equipment_uses eu
    WHERE se.performed BETWEEN trunc(sysdate-60/1440,'mi')
    AND trunc(sysdate,'mi')
    AND se.tserv_id IN ('EXM','GROUNDED')
    AND eu.gkey = se.equse_gkey
    AND eu.category IN ('I','E')
    GROUP BY se.tserv_id;
    now I want to write a query that shows me the result of above query and running total as well
    But the different between current activity and running total is as follows
    Current Activity = Last 60 minutes activity
    Running Total = Total activities from the 08:00 am till sysdate.
    for example if this query executed on 11:00 am then the current activity values must be from 10:00 am to 11:00 am and the running total values must be from 08:00 am to 11:00 am
    The reason for running total starts at 08:00 am is that the shift starts from 08:00 am to next day 07:59 am.
    Can I write one single query for this?
    Similarly running total values must be start from last day 08:00 am to current date and time when I executed this query from 00:00 to 08:00 (12 midnight to 8am)
    if difficult then plz let me know that how can I find that if the time is from 00 hrs to 08 hrs then start time must be the last date 08:00 am to the current date and time.
    Thanks
    Hassan

    Dear Frnak
    Thanks for your reply and help
    Its really did what I want
    I mean to say that the result format is correct but the value of Total_day column is not correct.
    Following is the sample data from 19-Jun-2008 08:00 AM to 20-JUN-2008 08:00 AM
    TSERV_ID  EQUSE_GKEY     PERFORMED
    ===============================================
    EXM       5188958     19-Jun-2008 8:00:32 AM
    EXM       5185586     19-Jun-2008 9:03:34 AM
    EXM       5181960     19-Jun-2008 9:03:35 AM
    EXM       5173333     19-Jun-2008 9:03:35 AM
    EXM       5188263     19-Jun-2008 9:08:49 AM
    GROUNDED  5174055     19-Jun-2008 9:10:29 AM
    GROUNDED  5152887     19-Jun-2008 9:10:29 AM
    GROUNDED  5187512     19-Jun-2008 9:10:29 AM
    GROUNDED  5196303     19-Jun-2008 9:27:41 AM
    EXM       5196370     19-Jun-2008 9:29:50 AM
    EXM       5172045     19-Jun-2008 10:01:23 AM
    GROUNDED  5196269     19-Jun-2008 11:11:29 AM
    GROUNDED  5200219     19-Jun-2008 11:24:39 AM
    GROUNDED  5185246     19-Jun-2008 12:06:30 PM
    GROUNDED  5190134     19-Jun-2008 12:09:27 PM
    GROUNDED  5190475     19-Jun-2008 12:09:27 PM
    GROUNDED  5156065     19-Jun-2008 12:26:49 PM
    GROUNDED  5132287     19-Jun-2008 1:56:44 PM
    EXM       5189203     19-Jun-2008 2:29:17 PM
    EXM       5180158     19-Jun-2008 3:27:03 PM
    EXM       5149310     19-Jun-2008 3:37:31 PM
    EXM       5196303     19-Jun-2008 3:42:48 PM
    EXM       5192768     19-Jun-2008 4:03:51 PM
    EXM       5174055     19-Jun-2008 4:14:23 PM
    EXM       5200231     19-Jun-2008 4:45:51 PM
    EXM       5157151     19-Jun-2008 4:51:06 PM
    EXM       5159930     19-Jun-2008 5:01:36 PM
    EXM       5185237     19-Jun-2008 5:01:37 PM
    EXM       5195434     19-Jun-2008 5:01:37 PM
    EXM       5152887     19-Jun-2008 5:06:49 PM
    EXM       5196269     19-Jun-2008 5:06:49 PM
    EXM       5187512     19-Jun-2008 5:17:26 PM
    EXM       5190134     19-Jun-2008 5:59:24 PM
    GROUNDED  5101919     19-Jun-2008 6:44:36 PM
    GROUNDED  5101918     19-Jun-2008 6:44:37 PM
    GROUNDED  5101913     19-Jun-2008 6:44:37 PM
    EXM       5185735     19-Jun-2008 6:46:38 PM
    GROUNDED  5195475     19-Jun-2008 6:47:11 PM
    GROUNDED  5195361     19-Jun-2008 6:47:12 PM
    EXM       5132608     19-Jun-2008 7:02:23 PM
    GROUNDED  5195334     19-Jun-2008 7:10:32 PM
    GROUNDED  5190558     19-Jun-2008 7:10:32 PM
    EXM       5183029     19-Jun-2008 7:33:53 PM
    EXM       5183480     19-Jun-2008 7:39:12 PM
    EXM       5189566     19-Jun-2008 8:00:11 PM
    EXM       5181825     19-Jun-2008 8:15:57 PM
    EXM       5183537     19-Jun-2008 8:15:57 PM
    EXM       5180210     19-Jun-2008 9:08:27 PM
    GROUNDED  5193136     19-Jun-2008 9:58:23 PM
    EXM       5171510     19-Jun-2008 10:21:59 PM
    EXM       5185615     19-Jun-2008 10:48:14 PM
    EXM       5184737     19-Jun-2008 10:53:29 PM
    EXM       5195475     19-Jun-2008 11:51:16 PM
    EXM       5195476     20-Jun-2008 12:01:46 AM
    EXM       5190558     20-Jun-2008 12:12:17 AM
    EXM       5196473     20-Jun-2008 12:54:19 AM
    EXM       5183204     20-Jun-2008 1:20:34 AM
    GROUNDED  5192844     20-Jun-2008 1:28:24 AM
    GROUNDED  5174238     20-Jun-2008 1:28:24 AM
    GROUNDED  5193127     20-Jun-2008 1:28:24 AM
    GROUNDED  5185794     20-Jun-2008 1:29:09 AM
    GROUNDED  5192895     20-Jun-2008 3:04:23 AM
    GROUNDED  5193039     20-Jun-2008 3:04:23 AM
    GROUNDED  5195447     20-Jun-2008 3:04:23 AM
    GROUNDED  5190228     20-Jun-2008 3:04:24 AM
    GROUNDED  5179370     20-Jun-2008 3:04:24 AM
    GROUNDED  5190289     20-Jun-2008 3:04:24 AM
    GROUNDED  5174065     20-Jun-2008 3:04:24 AM
    GROUNDED  5192862     20-Jun-2008 5:04:42 AM
    GROUNDED  5199903     20-Jun-2008 5:04:42 AM
    EXM       5178176     20-Jun-2008 6:30:29 AM
    EXM       5185161     20-Jun-2008 6:46:14 AM
    EXM       5180226     20-Jun-2008 6:46:14 AM
    GROUNDED  5202026     20-Jun-2008 7:03:14 AM
    EXM       5101912     20-Jun-2008 7:07:14 AM
    GROUNDED  5176763     20-Jun-2008 7:25:27 AM
    GROUNDED  5185494     20-Jun-2008 7:25:27 AM
    EXM       5185295     20-Jun-2008 7:38:46 AM
    EXM       5173837     20-Jun-2008 7:49:15 AM
    GKEY     CATEGORY
    =================
    5101912     I
    5101913     I
    5101918     I
    5101919     I
    5132287     I
    5132608     I
    5149310     I
    5152887     I
    5156065     I
    5157151     I
    5159930     I
    5171510     I
    5172045     I
    5173333     I
    5173837     I
    5174055     I
    5174065     I
    5174238     I
    5176763     I
    5178176     I
    5179370     I
    5180158     I
    5180210     I
    5180226     I
    5181825     I
    5181960     I
    5183029     I
    5183204     I
    5183480     I
    5183537     I
    5184737     I
    5185161     I
    5185237     I
    5185246     I
    5185295     I
    5185494     I
    5185586     I
    5185615     I
    5185735     I
    5185794     I
    5187512     I
    5188263     I
    5188958     I
    5189203     I
    5189566     I
    5190134     I
    5190228     I
    5190289     I
    5190475     I
    5190558     I
    5192768     I
    5192844     I
    5192862     I
    5192895     I
    5193039     I
    5193127     I
    5193136     I
    5195334     I
    5195361     I
    5195434     I
    5195447     I
    5195475     I
    5195476     I
    5196269     I
    5196303     I
    5196370     I
    5196473     I
    5199903     I
    5200219     E
    5200231     E
    5202026     EAnd I used the same query suggested by you.
    WITH     s     AS(     
    SELECT     se.tserv_id     ,     eu.category     ,
               CASE
                 WHEN     se.performed     BETWEEN     
                                    to_date('&target_dt','DD-MON-RRRR HH24:MI') - (1/24)
                                  AND     to_date('&target_dt','DD-MON-RRRR HH24:MI')
                          THEN     1
              ELSE     0
              END     AS in_hour     ,
            CASE
              WHEN     TRUNC (se.performed - (8/24)) =     TRUNC (to_date('&target_dt','DD-MON-RRRR HH24:MI')
                                                     - (8/24))
                THEN     1
              ELSE     0
              END     AS in_day
    FROM     service_events     se     ,     equipment_uses     eu
    WHERE     eu.gkey          = se.equse_gkey
         AND     eu.category     IN ('I', 'E')
      AND se.tserv_id in ('EXM','GROUNDED')
    SELECT     tserv_id,     
            SUM (DECODE (category, 'I', in_hour))     AS imp_hour,     
            SUM (DECODE (category, 'E', in_hour))     AS exp_hour,
            SUM (in_hour)     AS total_hour,
            SUM (in_day)     AS total_day
    FROM     s
    GROUP BY     tserv_idNow you have the sample data for almost 24 hours
    Let me clear it again
    When I executed this query at 20-JUN-2008 09:00 AM it gives me following result (that is accurate)
    TSERV_ID  IMP_HOUR  EXP_HOUR  TOTAL_HOUR  TOTAL_DAY
    EXM        2         0           2               3
    GROUNDED   1         0           1               8When I executed this query between 20-JUN-2008 00:00 to 20-JUN-2008 08:00
    then system must show the Total_Day value from 19-JUN-2008 08:00 to current date and time. e.g
    I executed this query at 20-JUN-2008 06:00 AM it gives me following result:
    TSERV_ID  IMP_HOUR  EXP_HOUR  TOTAL_HOUR  TOTAL_DAY
    EXM             0     0     0        44
    GROUNDED     2     0     2        35Now here you can see that the value of Total_Day is not as accurate as I required:
    EXM = 44 and GROUNDED = 35
    these values are between 19-JUN-2008 00:00 to 20-JUN-2008 06:00 (that is wrong in my case)
    The values of total_day should be as follows as 8 hours from 00:00 to 07:59 AM fall in the shift of 18-JUN-2008 not in 19-JUN-2008
    From 19-JUN-2008 08:00 to 20-JUN-2008 06:00
    EXM: 38
    GROUNDED: 32
    Plz note that this result is required because in our company the shift starts from 08:00 AM and ends 07:59 AM next day
    I hope you will be more clear now and there is no confusion anymore.
    Plz let me know if you still confused.
    Brgs,

Maybe you are looking for

  • Acrobat lying about file size

    I am trying to create a small PDF using Acrobat 8 on a Mac. I have several jpg files, and together they are exactly 10.17 MB. I am using the Combine Files feature of Acrobat. I press add files, select my jpgs, and choose 'Default File Size'. I press

  • Active data guard - patching

    Hi Gurus, I have primary db amsprd and active data guard amsprd_stby. we are planning to apply application patches in amsprd. earlier we used to rely on rman backup for restore in case of any failures. I would like to make use of standby as primary a

  • Doesn't enterprise manager works on windows 2000

    Hi All, I'm trying to install Enterprise manager 2.1.0 on Windows 2000. It is getting installed but whenever i try to start the services, it gives error that Some I/O operation is going on and hence it cannot start. Any reasons??? Thanx and Ragards,

  • Invoice printing in PDF

    Hi All, I want to print the Invoice in PDF, when i am saving the invoice.  I have configured PDFdevice type in  the spad for output device. Pls let me know what all settings and code changes i have to do for this. Thanks, Raju

  • Comparing .java files in JBuilder

    Is this possible? I couldn't find this discussed elsewhere on the forum and am curious if and how this can be done. Currently using JBuilder 3.00. The problem is that I have two slightly different .java files (applets) where one works and one doesn't