Record counter question

Right now, my report looks like:
Category           invoice number             invoice counter
      A -
100----
1
Result -
1
      B -
100----
1
Result -
1
Overall Result -
1
I know the overall result is correct, however the sum of category's result (2) is not equal to overall result.
Is there any way to show category A (or B)  result as 0 since the invoice number is the same ?
Thanks!
Edited by: wawzj619 on Feb 5, 2010 12:00 AM

Hi.
Since the same invoice is valid for both categories, the correct value is what you are getting now.
However, you can consider implementing your own count, where you assign to each category the share of the invoice, either applying a weighted approach based on the invoice value for each category or unweighted. This will give you 0,5 invioces per category in your example and the total will be 1.
Thus it can and has beeen done, but I think counting this way is not logical as you will be getting fx 8,21 invoices for a category and how can you interpret this number? Or, in you example, category A did NOT receive just half an invoice! They got a whole one. And so did category B. The fact that it's the same invoice does not mean each category received just half an invoice!
If you want your overall result to be the sum of invioces across categories and thus display "2" in your example, you can set the "calculate results as..." to "total" for the counter key figure. But the number 2 would - to me - be incorrect, because you only got 1 invoice...
regards
Jacob

Similar Messages

  • Record counts by hour,day - report

    Record count, grouped by day, hour
    Intended output:
    DATE | 00:00 | 01:00 | 02:00 | .....
    07-21-2011 | 100 | 200 | 300
    07-22-2011 | 500 | 0 | 200
    The below returns a version, but it doesn't account for when there are no records for a given hour.
    I've created a successful script, but it involves too many subqueries, and is an abmonination
    Any help would be awesome!
    (any table with a date field will work)
    with
    hrly_ttls as
    select to_char(sdate,'YYYY-MM-DD') as dte, to_char(sdate,'HH24') as hr,
    count(*) as cnt from df_audit_batches
    group by to_char(sdate,'YYYY-MM-DD'),to_char(sdate,'HH24')
    select dte,
    max(ltrim(sys_connect_by_path(cnt,' '),' ')) keep
    (dense_rank last order by level) as Ttls
    from (
    select hrly_ttls.*, row_number() over(partition by dte order by hr) as rn
    from hrly_ttls
    start with rn = 1
    connect by prior dte = dte
    and prior rn = rn - 1
    group by dte;
    ==> returns
    DTE TTLS
    2011-07-01     2 1 1 1
    2011-07-02     1 2 1 1

    Hi,
    Welcome to the forum!
    Whenever you post a question, please include CREATE TABLE and INSERT statements for some sample data. That way, people who want to help you can re-create the problem and test their ideas. Also post the results you want from that data. Simplify if possible. For example, if you need a query for all 24 hours in a day, you can post a question that only has data and results for maybe 3 hours. Adapting the result should be easy.
    Always say which version of oracle you're using.
    Since this is your first post, I'll post some sample data for you:
    CREATE TABLE     df_audit_branches
    (     sdate     DATE
    INSERT INTO df_audit_branches (sdate) VALUES (TO_DATE ('21-Jul-2011 00:00', 'DD-Mon-YYYY HH24:MI'));
    INSERT INTO df_audit_branches (sdate) VALUES (TO_DATE ('21-Jul-2011 00:01', 'DD-Mon-YYYY HH24:MI'));
    INSERT INTO df_audit_branches (sdate) VALUES (TO_DATE ('21-Jul-2011 02:02', 'DD-Mon-YYYY HH24:MI'));
    INSERT INTO df_audit_branches (sdate) VALUES (TO_DATE ('22-Jul-2011 01:40', 'DD-Mon-YYYY HH24:MI'));And the results you want from that data might look like this:
    DAY         TXT
    21-Jul-2011    2   0   1
    22-Jul-2011    0   1   0In the real problem, of course, you would need 24 "columns" in txt, not just 3.
    To include all hours, even if there is no data for a particular hour, do an outer join to a "table" (I used a sub-query, all_hours, not a real table) that has one row per hour.
    Here's one way to do that:
    WITH     got_cnt          AS
         SELECT       TRUNC (sdate)               AS day
         ,       TO_CHAR (sdate, 'HH24')     as hour
         ,       COUNT (*)               AS cnt
         FROM       df_audit_branches
         GROUP BY  TRUNC (sdate)
         ,       TO_CHAR (sdate, 'HH24')
    ,     all_hours     AS
         SELECT     LEVEL               AS n
         ,     TO_CHAR ( LEVEL - 1
                   , 'FM00'
                   )          AS hour
         FROM     dual
         CONNECT BY     LEVEL <= 3     -- or 24, for the real query
    SELECT       c.day
    ,       REPLACE ( SYS_CONNECT_BY_PATH ( TO_CHAR ( NVL (c.cnt, 0)
                                    , '999'
                )          AS txt
    FROM            all_hours     h
    LEFT OUTER JOIN     got_cnt          c       PARTITION BY (day)
                             ON     c.hour     = h.hour
    WHERE     CONNECT_BY_ISLEAF     = 1
    START WITH     h.n     = 1
    CONNECT BY     h.n     = PRIOR h.n + 1
         AND     c.day     = PRIOR     c.day
    ORDER BY  c.day
    ;This will work in Oracle 10.1 (and up).

  • Maximum record counts and property counts

    Hello,
    I am looking for the document/link that mentions maximum record counts and maximum property counts for each record.
    let say there are 1.5million records and each record has 2000 properties. Not sure if it can be handled nicely.
    Mdex version is 6.2.1 at this point. but can upgrade if higher version can handle more.
    Thanks,

    Jeremy is pretty much correct. There are no limitations except by performance.
    Start with the Performance Tuning Guide - here is a link to the 6.4.1 document:
    http://docs.oracle.com/cd/E41223_01/Mdex.641/pdf/PerfTuningGuide.pdf
    For your questions, start with Chapter 5 and read how properties/dimensions affect performance and this will help drive how you architect your queries and pipeline configuration/index setup to be most efficient.

  • Get estimated record count

    for pagination, we want to show the total pages. the way is to get the total count,then divided by the record number per page. The problem is its too expensive to get the total count.
    In pl/sql, we can get the estimated record count with
    select * from table(dbms_xplan.display_cursor(null,null,'ALLSTATS LAST')); but my question is how to get this number from application code, like java or php.
    Thanks,

    Hi,
    Though what you're trying to do can be achieved in three steps *(i)* importing of java.io.* and java.sql.* packages *(ii)* establishment of a connection using JDBC driver, and *(iii)* query execution, it would NOT be constructive for the fact that a SELECT statement (as stated in the above reply) will always be a part of the query sentence for the following reasons:
    (a) When objects are executed in Java, the first statement that is compiled is a SQL statement.
    (b) Parameters cannot be defined in SQL strings.
    Hence, as per my understanding, you can either stick to the existing approach or modify it as per the defined standards and not customized ones.
    Regards,
    Naveed.

  • Please help! Invalid node structure and invalid record count

    My MacBook Pro is about 6.5 years old. I upgraded to Snow Leopard 2 years ago and added RAM at the same time. My first problem ever occurred three days ago when my computer got super sluggish, I restarted and got the gray screen with apple and spinning wheel...no boot up. I ran disk utility from the snow leopard install disk and found "invalid node structure" and "invalid record count". After reading on here what to do...try to repair the disk and so on with no success I went out and bought Disk Warrior. Got home expecting to fix everything and Disc Warrior won't boot...I just get a file with a question mark and the disc is ejected. I tried erasing the hard drive but was only able to use the "don't erase data" option. Then I tried to reinstall Snow Leopard with no luck. Now I am stuck. Any ideas? 
    One thing to note is I am to the point of not caring about the files on the hard drive, I was a dummy and never backed them up...lesson learned!  I just want my computer back without having to spend $1000+ for a new one. Then again I am always willing to do that too as a last resort.
    PLEASE HELP!

    When you contact Alsoft, make sure you let them know that you are using Snow Leopard (10.6.8).
    Try the following in the meantime -
    Disconnect all peripherals from your computer.
    Boot from your install disc & run Repair Disk from the utility menu. To use the Install Mac OS X disc, insert the disc, and restart your computer while holding down the C key as it starts up.
    Select your language.
    Once on the desktop, select Utility in the menu bar.
    Select Disk Utility.
    Select the disk or volume in the list of disks and volumes, and then click First Aid.
    Click Repair Disk.
    Restart your computer when done.
    Repair permissions after you reach the desktop-http://support.apple.com/kb/HT2963 and restart your computer.
    Try DiskWarrarior again if it's combatible with the os system.
    YOu cannot reformat until you get your issue corrected.

  • Wrong Record count in Monitor maybe datasource issue

    Hi Gurus,
    I have an interesting problem; I am not sure if these are related problems.  First, I am loading data from a flat file to an DSO (using BI 7.0)  I created a transaction datasource.  Does it technically matter if I create a master data attribute datasource vs a transaction datasource when loading to a particular InfoProvider?  Can I specify that my datasource is a master data attribute datasource when loading into a DSO.  Will the system behave differently during a dataload based on the datasource type?
    Here is why I am asking my question:  I created an InfoPackage for the new datasource and when I execute it; it is reading the wrong record count based on my file.  I only have 20 records (using a test file); but yet it is saying 98 in the monitor?  I double checked and my file only has 20 records and on the "Extractor" tab, the system is pointing to the correct file.  Can the datasource have any connection to this problem?
    Thank you

    Hi,
    Technically it is possible to fill a DSO from e.g. a Master Data InfoSource but obviously before creating a new DataSource you must decide whether it concerns Master vs. Transactional data (depending on the nature of it).
    In some rare cases Transactional data from e.g. R/3 is treated as Master data in BW, for example PM orders.
    About your recourd count problem, do you have 98 records in the PSA as well? (because that should be the 'bold' representation of your file).
    If PSA gives 20 recs than the problem lies elsewhere (upstream): is there any abap-code in Startroutine or elsewhere doing some sort of redistribution of the data before it is loaded into the DSO?
    Hope this helps!
    Grtx
    Marco

  • Leaf Record Count???

    Hi
    I've never had any probs with my powerbook g4 until last week when it started to operate at a very very very slow pace and sometimes not connecting to my desktop (grey screen only after the apple logo). After running the disk repair from disk utility everything repaired apart from the leaf record count - which said:
    "Invalid leaf record count
    (It should be 6 instead of 53)"
    Does anyone know what this means? My mac started working ok again after repairing it despite this,but on Friday my mac wouldn't connect to anything on my desktop and the mouse arrow just kept turning into the spinning disk as if it was loading something but to no avail. Today it's working ok again but at a slow pace and when running the repair disk again in disk utility it says everything is fine apart from this leaf record count again - is this whats causing the problems? And if so, how do I repair it?

    Keelyb24:
    Joeuu is correct. Here is documentaton: Mac OS X 10.3: Disk Utility reports inaccurate "Volume needs to be repaired" message when checking Mac OS X 10.4 volume. If you used a Panther install disk for running DU, i suggest you try it from the Tiger install disk.
    In terms of your slow computer, that is another issue. Take a look at Dr. Smoke's FAQ Tuning Mac OS X Performance and see if you find anything there that helps. If the problem persists, please post back with further questions or comments.
    Good luck.
    cornelius

  • Invalid leaf record count (it should be 175 of 5069)

    Hi guys,
    Long time Mac user and desperately wanting to bring my old Sunflower IMac back to full life.
    I was having a few problems with it, sometimes had the question mark on boot up, lots of crashing.  Decided to do an archive and reinstall.  I had been running Snow Leopard.
    Seemed to go okay, but then it would accept my password.  (I chose to reinstall importing old usernames/settings.  Hope that wasn't a bit of time save that caused this.)
    Managed to google around and reset the password.  But then it booted into Darwin when it accepted my new password. 
    More googling, and checking these boards, and I ran disk utility repair and the "Invalid leaf record count (it should be 175 of 5069)" came up.  Ram repairs and so on, and it seemed to clear, but the disc wouldn't mount when I tried to verify again.
    Booted with S-command and tried fsck -fy which I'd come across earlier in the day.  (Logged in with my username and new password.)  At **Checking Extended Attributes file the same error came up as I found with disk utility.  Then I had,
    **Checking volume bitmap
    **Checking volume information
    **Repairing volume
    *++++ FILE SYSTEM WAS MODIFIED *****
    sh-2.05a# 0
    I've been reinstalling and trying things all day but I know I've gone as far as I can without your help now.  Hope there's some way to fix this.
    Thanks for reading all that.

    Thank you, baltwo.  I've done that a few times and it shows the same message.  But I'll keep at it for a while.
    I'm thinking maybe I'll need Diskwarrior which I saw mentioned in some threads here.
    *In my OP I meant 'it wouldn't accept my password' in the third paragraph.

  • Data Load : Number of records count

    Hi Experts,
              I want to document number of records transferred to BW during an infopackage execution.
              I want to automate the process by running a report in background which will fetch a data from SAP tables about number of records been transfered by all my InfoPackage .
    I would like to know how should I proceed with.
             I want to know some System tables which contains same data as that of RSMO transaction displays to us.
    Kindly help with valuable replies.

    HI,
    inorder to get the record counts report you need to create a report based on below tables
    rsseldone, rsreqdone, rsldpiot, rsmonfact
    Check the below link which explain in detail with the report code as well.
    [Data load Quick Stats|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/90215bba-9a46-2a10-07a7-c14e97bdb764]
    This doc also explains how to trigger a mail with the details to all.
    Regards
    KP

  • Record count per page , total record count per report in BI Publisher

    hi,
    In Oracle BI Publisher tool , can you please tell me how to display total record count of a report ? as well as how to display record count per page ?
    Thanks for your help
    Regards
    Gayathri

    check inbox. forwarded the updated template

  • Record Count Issue in Search page ?

    Hi Friends
    I am trying to display record count on Search page and I have the following code in
    The table has total of 62 Rows
    AM : for testing purpose, i am printing in log
    public void getISAGRecordCount()
    OAViewObject vo = (OAViewObject)getXXG2_ELIM_ISAGSView1(); //getXXG2ISAGSearchVO1();
    int fetchedRowCount = 0;
    vo.setMaxFetchSize(-1);
    vo.executeQuery();
    fetchedRowCount = vo.getRowCount();
    System.out.println("RowCount: "+ fetchedRowCount);
    IN PFR of CO: I am calling by this way
    am.invokeMethod("getISAGRecordCount");
    the Issue is
    for the first time, when i search  Based on search criteria, I know it should dispaly 10 records  but in the Log file i see the total Record Count of the Table     Ex; 62
    When i do the serach for the second time, based on search criteria, I know it should display 20 records, but the log file has 10 records ( previous search results)
    If I do the search for 3rd time, I see 2nd search results in log
    Any help in this issue, how to fix this?
    Thanks
    Ravi

    Hi,
    Please donot use getRowCount(), use getFetchedRowCount() and remove setMaxFetchSize(-1).
    Hope it will resolve your issue.
    Just for understanding of the concept:
    getFetchedRowCount() returns the number of rows cached in the view object -- including programmatically inserted rows.
    The getRowCount() implicitly execute a query against the database (if a query has not been executed yet)
    Regards,
    Reetesh Sharma

  • Invalid record count - grey screen- Target Mode Cures

    Hi there,
    I have a common problem: I was doing nothing particular that I remember: No fancy file uploads, doanloads, creation, erasing - nothing special:
    Anyway after a customary week, or few days of leaving the macbook permanently on, I think "let's give it a rest".
    Then switch back on:
    - Grey screen, spinning grey progress wheel fine.
    - Takes a while. Strange. After say a minute - it just switches off wordlessly.
    - Reset PRAM: No solution. Take a look with single-user startup in console: Files are all there, OK. Disk not dead.
    - Start up from OS X 10.5 disk:
    Permissions repair fine. Good.
    Verify disk: FAIL! +*Invalid Record Count.Volume check failed.*+
    Next: *Try target disk mode to back up essentials* - that works fine: I now have Time Machine AND a smaller important essentials backup.
    But finally, here's the surprise: Just for kicks, I *shut the macbook down, try a reboot - and it works!*
    But I note that root system files are unchanged since the problem occurred: ".hotfiles.btree" for example (I don't know what that is but suspect it's relevant).
    Then: I tried restarting again - and back to square one, it won't boot.
    Do the "Target disk" firewire mode trick again, and browse a few folders: And it boots (slowly).
    If I just leave the Macbook on permanently - everything seems fine. Not even sluggish.
    So:
    - Why can connecting a disk with an incorrect file system in target disk make the system forget about these problems when booting?
    - Why does the problem return on a successive reboot?
    - Is it related to some system files being ignored if booting straight after a target mode session?
    - What is ".hotfiles.btree", and should it not exist ?
    And the big one:
    - +Can extended Applecare, wot cost me loads of money, help me?+

    Hi Cornelius:
    Having been a faithful Apple-groupie for a while, and despite some problems over the years (hard drive failing, screen going, etc.) this is the first time I'm disappointed with them, because theor Micromat Applecare deal is a ripoff:
    You fork out for Applecare extension: All you get is something that say "Yep, you've got a problem. Now go and buy techtoolpro".
    That is, the TechTool Deluxe is practically useless. Argh.
    Worse: They keep that rather quiet. If you run TechTool deluxe, and it fails: It points you to the Techtool site to
    "download the TechTool Deluxe software with diagnostic and repair capabilities".
    You think "Aha, right, I need an update, or a DMG rather than just the executable".
    Download another 1.25Gb.
    So you try again: Same thing.
    The chiselling little crooks, to quote Ken Livingstone, won't even come out and say "Buy TechTool Pro to fix it". The website as reported above is wrong.
    Result: I'm not happy with them. And I'll never buy anything off Micromat.
    In the meantime, I've got a bootable backup thanks to CC-Cloner (excellent, I'll send him some money), and I'm waiting until I don't have any critical deadlines to allow myself time to restore a daily bootable backup.
    The dodgy files seem to be the Sun Developper Java suite according to CC Cloner.

  • How to find Maximum Record Count in a particular section

    Hi ALL
    My report has  3 detail sections. I am showing different set of data in each section.
    Example:
    Details a
    Details b
    Details c
    In the Details c section  I have 5 columns.
    I want to find out MAXIMUM RECORD COUNT in  only Details c.
    Actually I have done a running total on column1 field which gives me the records number in that section only. But I am not able to find the MAXIMUM record count.
    Rtotal   Colum1   Column 2 Column3
    1          Data1     Data2      Data3
    2          Data1     Data2      Data3
    3          Data1     Data2      Data3
    4          Data1     Data2      Data3
    Now I need the Maximum record count=4
    Thanks.

    If I have understood correctly you want to count the amount of records in each section.
    In this case, go to "Insert > Summary", choose your ID field, and choose "Count" in "Calculate this summary:". You can put the summary in your group footer.
    If you want the maximum (the highest number value in that column), you can choose "Maximum" instead of "Count".

  • Records count in Receiver File Adapter

    Hi All,
    I have a scenario IODC to File. The requirement is to get the total record count in the Trailer record of the Target File .Please help.
    Regards,
    Kevin

    Hello,
    The requirement is to get the total record count in the Trailer record of the Target File
    In your XML, decide which IDOC field you get your records from and then do a similar mapping
    IDOC field -> removeContext -> count -> TrailerRecordfield
    Hope this helps,
    Mark

  • Record count in internal table

    i want to know record count for the records stored in
    internal table.
    do we have any system field to display record count?

    Hi,
    Try this:
    Data: count_lines type i.
    describe table my_table lines count_lines.
    Regards,
    Arjan

Maybe you are looking for

  • JavaFX Composer and jdbc datasource

    I'm trying to build a javafx application that is basically a CRUD interface for a Microsoft SQLServer DB. I can drag and drop the jdbc datasource into my scene, and I can execute the select query against the table. I have copied over the jar file con

  • Error 15401: Windows NT user or group not found. Check the name again

    when adding a windows login on SQL SERVER 2008 R2 below error is throwing Windows NT user or group 'domain\user' not found. Check the name again. I have gone through the link http://support.microsoft.com/kb/324321/en-us & http://support.microsoft.com

  • Button click handler: isn't invoked

    Hi i have a problem with my buttons but i cant see it, i am trying to close the bet screen when a button is pressed but it dosen't reach the if statement can anyone see the problem here is the code(i also have a class main that invokes class roulette

  • Sbdadm create-lu results in sbdadm: data file error

    Hello, I am trying to create a new thin-provisioning LUN by issueing the following: sbdadm --disk-size 100M /export/data.lun This yields this error message: sbdadm: data file error I have tried that on two other Solaris Express 11 installations and I

  • Using Multiple Hard Drives for iTunes Storage

    I am running out of room on my current hard drive and want to use a new external hard drive to add space. My problem is I want to use both hard drives for storage (not the same music). Is this possible as I have only been able to direct iTunes to one