Display a count of data in a single report table based on date

Hello, I need a report that will display the name of the SOURCES, and compare the number of sources received TODAY and YESTERDAY
My table CELLS holds the name of the SOURCE, and their SAMPLED_DATE so I need to distinguish how many I reveived today and yesterdat.
eg.
SOURCE|TODAY|YESTERDAY
A | 10 |8
B | 7 |4
I am thinking of something like the below:
SELECT DISTINCT source, COUNT(source) TODAY, COUNT(CASE
WHEN sampled_date = TO_CHAR(SYSDATE-1, 'DD/MM/YY')
THEN 1 END) YESTERDAY
FROM cells
WHERE sampled_date = TO_CHAR(SYSDATE, 'DD/MM/YY')
GROUP BY.... CUBE
Any help will be much appreciated.

drbiloukos wrote:
Hello, I need a report that will display the name of the SOURCES, and compare the number of sources received TODAY and YESTERDAY
My table CELLS holds the name of the SOURCE, and their SAMPLED_DATE so I need to distinguish how many I reveived today and yesterdat.
eg.
SOURCE|TODAY|YESTERDAY
A | 10 |8
B | 7 |4
I am thinking of something like the below:
SELECT DISTINCT source, COUNT(source) TODAY, COUNT(CASE
WHEN sampled_date = TO_CHAR(SYSDATE-1, 'DD/MM/YY')
THEN 1 END) YESTERDAY
FROM cells
WHERE sampled_date = TO_CHAR(SYSDATE, 'DD/MM/YY')
GROUP BY.... CUBE
Any help will be much appreciated.Regardless of your final solution, if "sampled_date" is a character string, I'd convert it to a DATE (use TO_DATE) to compare against SYSDATE, rather than convert SYSDATE to a string for the comparison.

Similar Messages

  • How to display results set of multiple reports into a single report table

    Our goal is to create a single report (or dashboard) that shows the "funnel" of object creations related to each campaign. The flow goes from Activity to Lead to Opportunity as well as multiple steps within each (ie. Unqualified Lead -> Qualified Lead, etc).
    We currently have 3 separate reports in three different subject areas, each reporting the different metrics and we would like to combine the output into a single Unified report.
    For example what we currently have is:
    Activities:
    Campaign Name # of Activities
    Campaign A 12
    Campaign B 26
    Leads:
    Campaign Name # of Leads # of Qualified Leads
    Campaign A 10 4
    Campaign B 20 18
    Opportunities:
    Campaign Name # of Opportunities # of Opps per Sales Stage ... # of Wins Closed Revenue
    Campaign A 3 2 1 $1,000.00
    Campaign B 10 8 3 $2,800.00
    What we want to see is:
    Combined:
    Campaign Name - Campaign Cost - # of Activities - # of Leads - # of Qualified Leads - # of Opportunities - # of Opps per Sales Stage - # of Wins - Closed Revenue
    Campaign A - $423.00 - 12 - 10 - 4 - 3 - 2 - 1 - $1,000.00
    Campaign B - $ 1,000.00 - 26 - 20 - 18 - 10 - 8 - 3 - $2,800.00
    We have tried using the "Combine with similar analysis" but the number of columns for each subject area differ. We also tried creating multiple UNION criteria (one for each column), but in the case of # of Opps per Sales Stage and Closed Revenue, those are not "Metrics" fields, so they won't combine.

    Hi, You may have to create some dummy fields to equate the no. of field in each of the report matching the data type too and get a one single report using combined analytics and then using the resultant data you can create a simple pivot like below. Haven't tried it before
    -- Venky CRMIT
    Hi Venky,
    I am facing the same problem. Can you please say Steps how to create resultant data and Combine in pivot Table .
    Please Help me .
    Thanks in Advance .
    My mail id is :
    [email protected]

  • Display row count of dataset after grouping in report header?

    My dataset has 500 rows, but if I group that data by field DeptId, there are only 20 rows.
    I used something like the following, but it tells me that I can't use RowNumber in the page header:
    =RowNumber(Fields!DeptId.Value, "DataSetTeachers")
    I also tried something like CountRows("DataSetTeachers"), but that give me the total rows, which isn't what I want.
    Thanks.

    Hi,
    You can use CountDistinct function. This is the expression that I used in the page header:
    ="Number of rows: " & Countdistinct(Fields!Date.Value,"DataSet1")
    See the result:
    Hope it helps.
    Tracy Cai
    TechNet Community Support

  • How to print multiple copies of a single report(label) based on a variable

    I have a crystal report v.9 linked to an excel file with multiple rows of information.  Each row contains the label information and one column has the quanity of each label to print.  What feature in crystal do I use and what is the command I will need?   The information changes on a daily basis so I need a formula. Thanks in advance.
    Kurt

    There have been a few posts that have answered this in the past.  (I know because I answered them! :-> )  You might want to search for them.
    But basically, you want to do something like this in an SQL Command data source (MS SQL):
    declare @loop int;
    set @loop = 1;
      -- copy table structure (or otherwise create a temp table):
    select * into #temp from table where numLabels < 0 and numLabels > 0;
    while @loop < 20 -- or whatever a maximum number might reasonably be
    begin
      insert into #temp select * from table where numLabels >= @loop
      set @loop - @loop + 1
    end
    select * from #temp order by name, address  -- something to keep copies of labels together
    HTH,
    Carl

  • How to Display Record Count on Search page?

    Hi
    I am new to OAF and one of the requirement is to display record count on Search page . I followed the same steps in Emp Search page as an example and created my search page.
    I followed the following steps
    1) I created a transietn Attribute in VO by name RecordCount
    2) I had written a method in AMImpl
    public void getRecordCount() {
    OAViewObject vo = getXXG2SourceAcctSearchVO1();
    int fetchedRowCount = vo.getFetchedRowCount();
    String msg = fetchedRowCount + " are retrived by query ";
    System.out.println(msg);
    String xfetchedRowCount = Integer.toString(fetchedRowCount);
    System.out.println("xfetchedRowCount : " + xfetchedRowCount);
    OARow reportRow = (OARow)vo.createRow();
    System.out.println("in set attribute");
    reportRow.setAttribute("RecordCount",xfetchedRowCount); // I am using this way and trying to display record count into RecordCount view Attribute
    }//getRecordCount
    3) on the SearchPG, I created a new messageStyledtext by name RecordCount and assinged VO and viewAttribute accordingly
    I am not able to see record count when i run the page ?
    Am i missing any steps ?
    I see the messages in the log file but not in Record count box ?
    Any suggestions?
    Thanks
    Ravi

    Hi Anoop
    i made the code change according to you and because of the following condition, it is createing a" new row" in the search page
    Row row = vo.createRow();
    vo.insertRow(row);
    For every search it is creating a new blank row in search page .
    I did some more research and modified my code as
    public void getRecordCount() {
    OAViewObject vo = getXXG2SourceAcctSearchVO1();
    int fetchedRowCount = 0;
    fetchedRowCount = vo.getFetchedRowCount();
    String msg = fetchedRowCount + " are retrived by query ";
    System.out.println(msg);
    //vo.setMaxFetchSize(0);
    //vo.executeQuery();
    if (fetchedRowCount == 0 )
    Row row = vo.createRow();
    //row = (OARow)vo.first();
    row.setAttribute("RecordCount", "0");
    else
    String xfetchedRowCount = Integer.toString(fetchedRowCount);
    System.out.println("xfetchedRowCount : " + xfetchedRowCount);
    Row row = vo.createRow();
    //vo.insertRow(row);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    // Set the primary key value for this single-row VO.
    row = (OARow)vo.first();
    row.setAttribute("RecordCount", xfetchedRowCount);
    and in AM , I am calling this method in PFR as follows
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am1 =
    (OAApplicationModule)pageContext.getApplicationModule(webBean);
    am1.invokeMethod("getRecordCount");
    now i see the record count on the search page . but after 2-3 searches, the record count value is not populating the correct value. its weird
    Any suggestions
    Thanks
    Ravi

  • Query to display multiple counts in the result

    Hi,
    I need to be able to display multiple counts for different items in the single result set:
    Here is the simplified schema:
    I have 2 tables:
    STATEMENT table:
    ===============
    statement_pk number,
    department varchar2(20)
    STATEMENT_INFO table:
    ===================
    statement_info_pk number,
    statement_fk number
    is_statement_done varchar2(1)
    is_statement_locked varchar2(1)
    I need to display counts of how many records where done and how records where locked in the
    single output:
    Statement_PK Department NumberOfStatementsDone# NumberofStatementsLocked#
    1          ABC_dept          3                    5
    2          DEF_dept          4                    8
    3          XYZ_dept          7                    2
    The following does not work:
    SELECT
    s.statement_pk,
    s.department,
    COUNT(r.statement_info_pk ) NumberOfStatementsDone# ,
    COUNT(rr.statement_info_pk ) NumberOfStatementsLocked#
    FROM STATEMENT s ,
    STATEMENT_INFO r,
    STATEMENT_INFO rr
    WHERE
         s.statement_pk = r.statement_fk
         AND     s.statement_pk = rr.statement_fk
         AND      is_statement_done = 'Y'      AND rr.is_statement_locked = 'Y'
    GROUP BY statement_pk, s.department
    I was trying to work with analytic function but could not figured it out either.
    Please help
    Thanks,
    Ia.

    this would be something like:
    SQL> r
      1  select statement_pk,
      2         department,
      3         sum(decode(is_statement_done, 'Y', 1, 0)) statement_done,
      4         sum(decode(is_statement_locked, 'Y', 1, 0)) statement_locked
      5  from   statement_info,
      6         statement
      7  where  statement_fk = statement_pk
      8* group by statement_pk, department
    STATEMENT_PK DEPARTMENT           STATEMENT_DONE STATEMENT_LOCKED
               1 ABC_dept                          4                1
               2 DEF_dept                          6                2
               3 XYZ_dept                          1                2
    SQL> Message was edited by:
    Leo Mannhart
    Craig you were faster

  • Who worked with ICS' Model 4896 GPIB? I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.

    I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.

    Hello. Most of the engineers in developer exchange are more familiar
    with NI products. Contacting ICS for technical support is a better
    course of action.

  • Is that possible to display the user selection data in the printable page?

    Hi All,
    I'm going to add a printablepage button on my page.
    Here comes a questions.
    Is that possible to display the user selection data in the printable page?
    For example,
    I have a table in the page,with 10 records.User select 5 of them.Can I display these 5 records in the printable page?
    Please help.

    Hi Yannick,
    Thanks a lot for the information. It worked.
    The portlet data can be accessible using bindings, but parameter name can be different.
    Meanwhile I have got one more scenario, where the Portlet and Task Flow placed in different pages of WCP Application. On change of data in the Portlet the application should navigate to another page where the Task Flow placed and displays selected data.
    Basically I can not use any button for navigation. The navigation should happen once I do some action in Portlet.
    Is this possible? If yes can you please let me know the steps?
    Thanks in advance!
    Somnath
    Edited by: Somnath Basak on Dec 20, 2011 9:41 AM

  • Creating a Single Report from Oracle Data Base and BI Answers

    Hi,
    I wanted to create a single report by using a BI Report where in we have project and Activity columns,now I want to add column with Program to see the results.Program data is in Oracle Database.
    Can some one help me how to create the report.
    ii.How to edit a pivot table in BI word designer.What I am doing present is creating every time a new report.
    Thx In Adv.
    From Sravan

    Hi Pivot table was a general question.Is is nothing to do with the qus 1.
    See I have a report which have a programme and Activity.So I need to get the data of Prject from Data base how to do this in BIP.....I am not using any pivot table here.

  • Got a new Mac, my iTunes is whack, (No Play Count or Date Added)

    Hello, everybody. It's been a rough night.
    I currently own a G4 iMac and I just got a brand new Macbook. The Macbook is very nice, it's extremely speedy and I am sure I will grow to love it. We've got just one hurdle to get through together: the organization of my music in iTunes. Now, I've had the iMac for five years, and not long after I got it adding music to it became something of an importance, it was my music player. Over the past five years I've not only added thousands of songs, but meticulously and very specifically organized them into playlists based on the number of spins they have and when they were added. To a lot of people I know this sort of thing isn't a huge deal, but for me this organization became, and I kid you not, a huge, huge part of my life.
    So I get the new Macbook, fire it up and use Migration Assistant, (with the iMac in Target Disk Mode), to move my data over. When it's done I open the iTunes and am greeted with... nothing. Well, okay, all of my music is there, that's nice, (it's what iTunes is for, etc etc), but NONE of my play count or date added information remains. I weep inside.
    Being that this is my first new computer in five years, (a long time!), you might be able to tell that I was hesitant about upgrading. Before getting my Macbook I asked experts at the Apple Store if this method would work, and even received assurance from several people online that everything would be preserved. So, I did my homework, but my Macs and I both apparently failed the test. Here's where we are now:
    1. The iMac, (running Tiger), still has iTunes on it, with all the information, nothing seems to have changed on that end.
    2. The Macbook has a hard drive full of music with no playlist, play count or date added data.
    3. I do own an iPod where I backed up the music before the move. I know that the data information on playlists, play count and date added is on the iPod. I do not dare plug it in to the new machine for fear of the unknown.
    Which brings me here, is there some way, any way of rectifying this? Here is what I would like:
    1. For the Macbook iTunes to look EXACTLY like the iMac's does.
    2. For it to work with both my old iPods without question.
    This has been long, and I fear that some may pass it over as something too much of an banality to be needed help with. But like some collect shoes or hats, I collect music. It's a lovely collection and it's a large part of who I am. I could start all over, but that's sort of like saying the world could start over if it by chance happened to forget how to turn. It would take a lot of effort, and there would be some (more) tears, but I could move on. But I really, really don't want to. I just want things to be the way they were. I'd very much like to have this information present, and I thank you all for your time.

    ADDED:
    Now that I look at it, appears that nothing except for my applications transferred over. My old computer is listed in the Hard Drive, but I can't access any of the folders because I don't have that "level of privileges" or whatever, (odd, considering they're both my computers, do they need to be hooked up for this?). I don't really need for my old applications to be there, (Hello, iWork '06 Demo!), so can I just go and erase them, or am I better just starting all over again?

  • Rolling up data into a single report, CRMOD just cannot do it?

    So far as I've learnt, CRMOD is unable to do reports such as this and I'm hoping someone will correct me as I find it to be quite a crippling deficiency in terms of flexibility in delivery reports that clients want.
    Take this example of an ERD:
    http://img215.imageshack.us/img215/1574/erdg.jpg
    Portfolio would be a Custom Object 1, Account Allocation and Financial Info would be Custom Object 4 and 5 let's say.
    Portfolio to Account Allocation is a many-to-many relationship, hence the intermediate Account Allocation object which also has fields of its own.
    As far as I know, I will not be able to report on, an aggregate of all the financial info (e.g. SUM of a currency field in Financial Info) of all the accounts associated to a portfolio. Because of the way CRMOD reports tries to make a link between ALL objects in a single report, putting all 4 together won't work since Financial Info is not in any way linked directly to Portfolio or Account Allocation.
    I know I can link Portfolio to Account Allocation and Account (with the metric from Account Allocation), but then I cannot bring in Financial Info at the same time.

    I am aware of the Portfolio object in the GWM vertical, I was just using it as an example entity to show how the relationships are. :)
    I've used Combined Analysis many times before, but it will not help for a situation like this.
    But yeah, just seeing if any new workarounds to this have come up recently. Personally I find this to be one of the biggest deficiencies with the CRMOD reporting engine.
    It would be great if they would just provide an option to write Oracle PL/SQL code to pull data out from tables ourselves sometimes, then we can specify our own INNER/OUTER joins haha. :D

  • How to display metadata such as data load date in answers report title?

    We have a requirement to display the last load date of the data relevant to the report the user is viewing. We have such information stored in a metadata table listed by the fact table the report is referencing. Our proposed solution is to create new answers reports off of this metadata table and put each report (with the appropriate filter on the fact table) on each dashboard section where the corresponding report is placed. One problem with this approach is the load date information will not be reflected in the print form of the report as the date is dashboard content - not report content. Is there any way to overcome this situation (other than create a ton of variables specifically created for this purpose)? I'm open to entertaining javascript ideas, if necessary. I would love to know how to push this OBIEE envelope further. Thanks in advance.

    Hi,
    I discuss with some people who are familiar with SharePoint, we both thought Windows Explorer may
    not accept the custom metadata.
    if we want to do some customization, it is recommended to ask for help in development forum.
    http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/home?category=windowsdesktopdev
    If you have any feedback on our support, please click
    here
    Alex Zhao
    TechNet Community Support

  • How to display the count of a list item in Sharepoint Designer?

    How to display the count of a list item in Sharepoint Designer? please reply with the proper code line to add for this.

    Hello,
    What version of sharepoint you are using? Try below approach:
    http://sharepointlogics.com/2010/03/total-count-of-items-in-list-in.html
    Hope it could help
    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer
    Please feel free to unmark answer if does not resolves your problem.

  • How should i use the two results sets in one single report data region?

    Hi frnz,
     I have to create a report using the below condition...
    Here my given data  set query gives you the two result sets ,so how should i use that two result sets information in single report....when i accessing that data set query it will take the values off the first result set not for the second result set.
    without using sub report and look up functionality..... if possible
    is there any way to achieve this.....Please let me know..
    Thanks!

    You cant get both resultsets in SSRS. SSRS dataset will only take the first resultset
    you need to either create them as separate queries or merge them into a single resultset and return with ad additional hardcoded field which indicates resultset (ie resultset1,resultset2 etc)
    Then inside SSRS report you can filter on the field to fetch individual resultsets at required places. While merging you need to make sure metadata of two resultsets are made consistent ie number of columns and correcponding column data types should be same.
    In absence of required number of columns just put some placeholders using NULL
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to COUNT all data Characters in an IDOC ?

    Hi All,
    I am doing an IDOC-->File scenario.
    As per the Third party system requirements, I need to COUNT all the Data characters (Minus the EDIDC record) and  write this value at the end of the trailer record in the file.
    Example:
    EDIDC--> SAPR3, LS...
    E1KNA1M-->SHIRIN, UK, SW1DPL
    E1KNBKM-->SHIRIN, CITIBANK
    So in this example I should sum up(COUNT) all the characters(of Data) belonging to segment E1KNA1m and E1KNBKM. So here COUNT is '28'. So I need to write the value '28' at the end of the file.
    I want to know, is it possible to count data in XI mapping or should this be done in R/3 itself and appended as a COUNT field to the IDOC.
    Appreciate any suggestion help on this. All I want to know which is the best practise/place to count the data characters in this scenario.
    Thanks
    Shirin

    Hi,
    Thanks for explaining.Really appreciated.
    Just to confirm,
    in Java edit Section I have added the following data: Please let me know if that is correct.
    Imports:
    Global Variables: len
    Initilisation section: 0
    Clean-up:
    Similarly in UDF I have entered the following data:
    Label/Description: Calculate length
    Cache: Value(radiobutton)
    Arguments: a
    Next screen:
    Imports:
    public String Calculate(String a, Container container)
    Then entered ur code.
    When I save and activate I get the following error
    Starting compilation  Source code has syntax error:  D:/usr/sap/XRD/DVEBMGS02/j2ee/cluster/server0/./temp/classpath_resolver/Map2494b0c0596b11dda115001a4b52813a/source/com/sap/xi/tf/_MM_ALLOCATION_RESPONSE_.java:32: <identifier> expected public /*!_$ClNRep_*/_MM_ALLOCATION_RESPONSE_(){} ^ D:/usr/sap/XRD/DVEBMGS02/j2ee/cluster/server0/./temp/classpath_resolver/Map2494b0c0596b11dda115001a4b52813a/source/com/sap/xi/tf/_MM_ALLOCATION_RESPONSE_.java:210: ';' expected } ^ 2 errors
    Appreciate if you could help.
    Thanks
    Shirin

Maybe you are looking for

  • SRM Product / Material creation - Data flow to SAP MDM

    Dear SAP friends, I need your help with 2 issues. Thanks in advance for your collaboration. Our client needs to create products and make them available to purchase almost immediately. The scenario we had working for the last 2 years was: product crea

  • FM for Org Unit check

    Hi experts Is there any FM which directly check whether specified org unit directly comes under another org units for particular begda and endda. Thanks, Shital

  • HP Pavilion dv6000 (service tag dv6620ea) not powering on

    Hi, When I plug the power adapter in, the blue light displays around the plug indicating power is reaching the notebook.  When I press the power button, it starts to power up but then turns itself off.   When I press the power button again, nothing h

  • Authorization profile for partner user account

    Can anyone please tell me which authorization profile should be assigned to the user account that a partner of ours will use when they use basic authentication to sign on to our PI box when they consume a web service? Regards Philip Edited by: Philip

  • OSD TS Fails during package download - SendWinHttpRequest failed. 80072ee2.

    Hi there, I have a SCCM 2012 R2 environment running on Windows Server 2012 on VMWare Workstation 10.0.1. My TS is deploying Win7x64 to another VM. I am using MDT integration and the first action after "Setup Winodws and ConfigMgr", and restarting fro