Simple filter question

I have a dataset  of many years data.  I want to show the count of records for each of the past 7 days.
If I add date and record count then run the query, I add a variable:
=RelativeDate(CurrentDate(); -7) < [Date]
Then in the report filters panel I filter by this variable = 1, and the correct result returns.  However, with a filter at this level I guess all the data is returned from the database for many years, then on a second step the data is filtered.  We have a lot of data so I would like the filtering to take place in the first step, on the original query.  I can't see how to use a variable or enter a formula into the query filter panel.  I could add this to the universe, but then we will end up with a lot of "filter 7 days", "filter 30 days", ...
Questions: What is the best way to filter by past 7 days, or how can I add this formula to the query filter?

Josue,
Suresh gave a good answer, however, to get back to your original question:
Questions: What is the best way to filter by past 7 days, or how can I add this formula to the query filter?
It is always more efficient to filter at the server (database server) level versus bringing more data to the workstation (client), however, for each filter, as you are observing, it requires an object filter to support.  Another way to handle this particular situation might be through the use of a prompt.  You could prompt the user for the number of days (7 or 30, etc) and then you could use one filter object and have maximum flexibility.
Thanks,
John

Similar Messages

  • Simple/silly question: how do I set/change default font/color for outgoing mail messages?

    Simple/silly question: how do I set/change default font/color for outgoing mail messages?

    Just a suggestion..........
    Download Thunderbird.  Easier to use when it comes to what you want to do w/your emails. 

  • 4 Simple Flash Questions that Are Stumping Me!

    What is the Frame Rate for Web Animations
    Q1. I am making an animation which will be played on the web. What is the default frame rate (fps) of Flash CS5? And what is the frame rate of for web?
    Q2. My animation needs to be 30 seconds long. So at 15 fps that would mean I need to use 600 frames in Flash?
    How Do I Mask everything so all I see is the Content on the Stage?
    I have a wide image that extends past my movies stage size so when I preview my movie the image is visible. How do I mask out anything that extends past my movies window size? I believe I can create a layer named "mask" and place it above all other layers, but I forget how to make the mask. Any help is appreciated.
    How to Fade a Graphic
    I have a graphic element (some type) and I want it to fade from 0% to 100%. In older versions of Flash I could just select the symbol and then set it's alpha value to 0%, move a few keyframes and then set the alpha to 100%. Voila! but now it doesn't seem to work that way. How can I do this in CS5?

    Ned, it says 24 fps which means there is 24 frames per second so each 24 frames is 1 second.
    Date: Fri, 4 Nov 2011 05:35:16 -0600
    From: [email protected]
    To: [email protected]
    Subject: 4 Simple Flash Questions that Are Stumping Me!
        Re: 4 Simple Flash Questions that Are Stumping Me!
        created by Ned Murphy in Flash Pro - General - View the full discussion
    1 You can create your character as a movieclip and copy/paste that movieclip from one file to another. 2. One way to create a movieclip is to copy all the frame of the animation's timeline (select them all, right click the selection, choose Copy Frames), then create a new movieclip symbol (Insert -> New Symbol...etc) right click on its only keyframe and chhose Paste Frames.  THat will put all the layers and frames you copied into the movieclip The only way to come close to being certain about the timing of you animation is to use code to keep track of the time, something like getTimer()..  The frame rate that a file plays at is not a reliable means of dictating the time it takes due to a variety of factors which include the amount of content you are trying to process and performance limits of the user's machine.
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4007420#4007420
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4007420#4007420. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Flash Pro - General by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Simple performance question

    Simple performance question. the simplest way possible, assume
    I have a int[][][][][] matrix, and a boolean add. The array is several dimensions long.
    When add is true, I must add a constant value to each element in the array.
    When add is false, I must subtract a constant value to each element in the array.
    Assume this is very hot code, i.e. it is called very often. How expensive is the condition checking? I present the two scenarios.
    private void process(){
    for (int i=0;i<dimension1;i++)
    for (int ii=0;ii<dimension1;ii++)
      for (int iii=0;iii<dimension1;iii++)
        for (int iiii=0;iiii<dimension1;iiii++)
             if (add)
             matrix[i][ii][iii][...]  += constant;
             else
             matrix[i][ii][iii][...]  -= constant;
    private void process(){
      if (add)
    for (int i=0;i<dimension1;i++)
    for (int ii=0;ii<dimension1;ii++)
      for (int iii=0;iii<dimension1;iii++)
        for (int iiii=0;iiii<dimension1;iiii++)
             matrix[i][ii][iii][...]  += constant;
    else
    for (int i=0;i<dimension1;i++)
    for (int ii=0;ii<dimension1;ii++)
      for (int iii=0;iii<dimension1;iii++)
        for (int iiii=0;iiii<dimension1;iiii++)
           matrix[i][ii][iii][...]  -= constant;
    }Is the second scenario worth a significant performance boost? Without understanding how the compilers generates executable code, it seems that in the first case, n^d conditions are checked, whereas in the second, only 1. It is however, less elegant, but I am willing to do it for a significant improvement.

    erjoalgo wrote:
    I guess my real question is, will the compiler optimize the condition check out when it realizes the boolean value will not change through these iterations, and if it does not, is it worth doing that micro optimization?Almost certainly not; the main reason being that
    matrix[i][ii][iii][...]  +/-= constantis liable to take many times longer than the condition check, and you can't avoid it. That said, Mel's suggestion is probably the best.
    but I will follow amickr advice and not worry about it.Good idea. Saves you getting flamed with all the quotes about premature optimization.
    Winston

  • Hide Simple Filter

    Hi Experts
    I am looking for a option to hide simple filter for some of the users in enterprise. I tried modifying below rights.
    Interactive: General - Ability to hide / show toolbars
    Interactive: Reporting - Create and edit report filter
    I am still seeing the simple filter in Webi Reports.
    Please advice
    Re: Disable "Add Simple Report Filter" from WEBI XI3

    Prasath,
    I noticed in the post in your link, it mentioned making sure the developer of the report saves it with the filter area suppressed. Could that be the issue?
    Thanks

  • A few simple Logic questions...please help.

    I have a few probably simple Logic questions, that are nonetheless frustrating me, wondering if someone could help me out.
    1. I run Logic 8, all of the sounds that came with logic seem to work except organ sounds. I can't trigger any organ sounds (MIDI) on Logic, they won't play. I have a Yamaha Motif as my midi controller.
    Any idea why?
    2. I've starting running into a situation where I will record a MIDI track, the notes are recorded but they won't playback. The only track effected is the one that was just recorded. All other midi tracks playback.
    I have to cut the track, usually go out of Logic and back in, re record for it to playback properly. Any idea why this may be happening?
    3. How important is it to update to Logic 9. Are there any disadvantages down the road if I don't upgrade. If I purchase the $200 upgrade, do I get a package of discs and material, or it just a web download.
    Any help is appreciated!
    Colin

    seeren wrote:
    Data Stream Studio wrote:
    3) You get a full set of disks and manuals.
    They're including manuals now?
    I think his referring to the booklets ...on how to install etc
    It would be great to see printed manuals though ...I love books especially Logic/Audio related !!
    A

  • Simple Quick Question

    wrong section, post was moved.
    Message was edited by:
    Rob17

    you titled "simple quick question"...
    .. complicated to answer..
    a) the TermsOfUse of the iTS don't allow any processing of purchased files, these are "copy protected"..
    b) iM has a voice-over function..
    c) iM is a video-edit app.. easy to use... just learn to handle it...
    d) iM allows to "extract" audio (=muting the original audio, adding your own..)
    e) to learn iM, spend some time here: http://www.apple.com/ilife/tutorials/imovie/index.html
    f) use pencil and paper first! WRITE and scribble, what shall happen when in your movie/parody... make a script, draw a storyboard .. THEN launch iM.. in other words: think first, then edit.. iM is just a tool, it does not "create"... Picasso needed a papertowel and half a stencil to create art....
    g) to get comfortable with iM, start with your own, small, short (3min!) project... import some stills, edit them, add a funny voice-over, add sounds, add music... good? make a bigger one...
    h) .. in our Lecture II, we teach you how to import shows from TV, youtube, wherever..
    standard disclaimer:
    be nice to ©opyrights ...

  • Simple query question

    hi all,
    I have a XMLType table with one column - I have presently one row, in my column xmlsitedata I have stored one large xml file.The schema definition is given below:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    - <xs:element name="siteList">
    - <xs:complexType>
    - <xs:sequence>
    <xs:element name="site" type="siteType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    - <xs:complexType name="siteType">
    - <xs:sequence>
    <xs:element name="nameEn" type="xs:string" />
    <xs:element name="nameFr" type="xs:string" />
    </xs:sequence>
    <xs:attribute name="code" type="xs:string" />
    </xs:complexType>
    </xs:schema>
    I have executed the query below:
    select x.XMLSITEDATA.extract('/siteList/site/nameEn/text()').getCLOBVal() "stName" from wsitelist x;
    and I get all english names of some 200 locations, however, there is 1 row selected and all names show up on one row. How do I split them into 200 or whatever rows?
    Thanks,
    Kowalsky

    Have a look at the answer provided in the following thread.
    very simple XML question
    This may solve your problem.
    use xmlsequence.
    Alvinder

  • Simple e4x filter question

    For the life of me I just can't figure out why this does not work.
    Here is the variable of type XML called "datagrid":
    var datagrid:XML = <data>
      <record id="1" companyname="abc" password="pass1" isactive="Y"/>
      <record id="4" companyname="companyx" password="dog" isactive="Y"/>
      <record id="2" companyname="def" password="pass2" isactive="Y"/>
      <record id="3" companyname="ghi" password="pass3" isactive="Y"/>
      <record id="5" companyname="test" password="testpwd" isactive="Y"/>
      <record id="6" companyname="test2" password="testpwd2" isactive="Y"/>
      <record id="10" companyname="test3" password="testpwd3" isactive="Y"/>
      <record id="11" companyname="test4" password="pwd4" isactive="Y"/>
      <record id="12" companyname="test5" password="pwd5" isactive="Y"/>
    </data>;
    Here are a series of traces:
    trace(this.griddata.record[0]);
    trace(this.griddata.record[1]);
    trace(this.griddata.record[2]);
    trace(this.griddata.record[2].@id);
    trace(this.griddata.record.(@id=="5"));
    Only the 4th trace returns the value "2".  The rest of the traces return absolutely nothing when they should return some data.  The one in particular I'm interested in is the last one, which should return  <record id="5" companyname="test" password="testpwd" isactive="Y"/> .
    I've done a lot of e4x filtering and I can't see the difference between what I've done in the past successfully and this simple example now.  Is there something obvious I seem to be overlooking?

    Trace uses toString() which only returns text nodes, not the actual XML or text in attributes.  Try
    trace(this.griddata.record.(@id=="5").toXMLString());
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Filter Question part II

    Hi,
    do you remember my previous post? Well, now I've a similar requirement, but again I haven't a solution. i've following question:
    I've a prompt with two choices: "All" and "WITHOUT ICO" wich fill a presentation variable 'ICO'. Then i've a report that contains a column "JDE Account" wich contains accounts id (if an account is ICO then it will finish with letter I, otherwhise not.
    Examples of ICO Accounts: 1384I, 14849I and so on
    Examples of WITHOUT ICO Account: 3893, 4484.
    I want that if user choices 'ALL' prompt value the report returns all accounts, otherwhise if user choices 'WITHOUT ICO' prompt value the report filter only accounts WITHOUT ICO.
    I've tried many filters (simple filters and complex), but it doesn't work. Can you help me???
    Thanks
    Giancarlo

    Hi,
    i've tried but it doesn't work. I give following error:
    Error during retrieving drilling info: SELECT "Cost Center"."Organization Region Description" saw_0, FILTER(Prototype."Fact PNL"."Local Actual Monthly" USING Prototype.R012."R012 1 position Code"='A') saw_1, FILTER ("- Budget"."Local Budget Monthly" USING Prototype.R012."R012 1 position Code"='A') saw_2, FILTER(Prototype."Fact PNL"."Local Actual Monthly" USING Prototype.R012."R012 1 position Code"='A')-FILTER ("- Budget"."Local Budget Monthly" USING Prototype.R012."R012 1 position Code"='A') saw_3, (FILTER(Prototype."Fact PNL"."Local Actual Monthly" USING Prototype.R012."R012 1 position Code"='A')/FILTER ("- Budget"."Local Budget Monthly" USING Prototype.R012."R012 1 position Code"='A')-1)*100 saw_4 FROM Prototype WHERE (Time."Year" = 2010) AND (Time."Desc Month" = 'January') AND (Country."Country Code Company GOAL Code" IN (SELECT saw_0 FROM (SELECT Country."Country Code Company GOAL Code" saw_0 FROM Prototype WHERE Country."Company Description" = 'GERMANY') nqw_1 )) AND ("JDE Account"."HFM Account Code" in (Select "JDE Account"."HFM Account Code" From Prototype where ‘WITHOUT ICO’ = ‘Tutti’) OR "JDE Account"."HFM Account Code" in (Select "JDE Account"."HFM Account Code" From Prototype where "JDE Account"."HFM Account Code" not like ‘%I’ and ‘WITHOUT ICO’ = ‘WITHOUT ICO’))
    Error Details:
    Error Code: YQCO4T56:OPR4ONWY:U9IM8TAC:OI2DL65P
    Driver Odbc returns an error (SQLExecDirectW).
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <ICO’>: Syntax error [nQSError: 26012] . (HY000)
    Istruzione SQL eseguita: {call NQSGetLevelDrillability('SELECT "Cost Center"."Organization Region Description" saw_0, FILTER(Prototype."Fact PNL"."Local Actual Monthly" USING Prototype.R012."R012 1 position Code"=''A'') saw_1, FILTER ("- Budget"."Local Budget Monthly" USING Prototype.R012."R012 1 position Code"=''A'') saw_2, FILTER(Prototype."Fact PNL"."Local Actual Monthly" USING Prototype.R012."R012 1 position Code"=''A'')-FILTER ("- Budget"."Local Budget Monthly" USING Prototype.R012."R012 1 position Code"=''A'') saw_3, (FILTER(Prototype."Fact PNL"."Local Actual Monthly" USING Prototype.R012."R012 1 position Code"=''A'')/FILTER ("- Budget"."Local Budget Monthly" USING Prototype.R012."R012 1 position Code"=''A'')-1)*100 saw_4 FROM Prototype WHERE (Time."Year" = 2010) AND (Time."Desc Month" = ''January'') AND (Country."Country Code Company GOAL Code" IN (SELECT saw_0 FROM (SELECT Country."Country Code Company GOAL Code" saw_0 FROM Prototype WHERE Country."Company Description" = ''GERMANY'') nqw_1 )) AND ("JDE Account"."HFM Account Code" in (Select "JDE Account"."HFM Account Code" From Prototype where ‘WITHOUT ICO’ = ‘Alli’) OR "JDE Account"."HFM Account Code" in (Select "JDE Account"."HFM Account Code" From Prototype where "JDE Account"."HFM Account Code" not like ‘%I’ and ‘WITHOUT ICO’ = ‘WITHOUT ICO’))')}
    However i haven't a column All.
    Thanks
    Giancarlo

  • Simple (?)  question about KM Permissions

    Is it possible to make a KM Folder writeable for end-user making sure at the same time that the end-user when viewing the folder is only able to see the documents he/she created/uploaded and not the content uploaded/created by others.
    You can of course write a resource list filter to implement this, but my question is : is there a way to achieve this without programming, by simple configuration.

    Hi Theo Paesen
    You can try for this if your requirement is for creating a Personal folder for your user.This Corresponding Folder   will only be visible to the user based on his/her Userid.So the user can upload his/her documents to this folder and he/she alone will be able to see it.
    Create a KM Navigation iview.In the path to the folder in the KM Navigation iview you can use the Userid as follows.
    Path to initially displayed folder : <path from root..folder/<user.id>.So depending upon the user, the contents inside the corresponding folder is displayed.
    Eg: all personal folders inside the documents/Personal folder.
    Path to initially displayed folder : documents/Personal/<user.id>
    Regards
    Geogi

  • Simple Report Question

    Post Author: scott123
    CA Forum: General
    I want to take the information in a simple excel table and recreate it 3 times, each time sorting/grouping on a different columnHere is the tableAnd here is the report that I'm trying to generate (first sorted by name, alphabetically, then grouped by rank, then grouped by size) I'm comfortable working with excel tables in Crystal, but I'm running into a problem repeating the information and then sorting each group separately. I also have no problem doing each group in a single report (without repeating any records), but I'd like to include all 3 groups in a single report.  My apologies for how remedial this question is- I thought for sure that Crystal could do this easily but I've spent a couple of days on this and am running into a brick wall.

    Post Author: pandabear
    CA Forum: General
    That's right Scott, and maybe make them "on demand"
    sub reports so the user only has to see the data they
    really want at the moment.  Gives the report a nice clean look too.
    PB

  • A simple security question

    I'm trying to write a simple self-signed applet that use a jca provider but thi exception "java.security.SecurityPermission putProviderProperty.BC" is thrown. if I use a policy file, it works fine but for a beginner user is not very useful intall a new policy file.
    After this I tried to write a new self-signed applet that read a file and open a ServerSocket on port 21, and it work fine without a new policy file!
    My question is this: why is needed a policy file to add a provider and not to open a ServerSoket or read/write a file???????
    PS
    if u have an idea to resolve my problem without a policy file, tell me pls!!! IT'S URGENT!!

    An applet works out of a so-called sandbox. The security restrictions can be overcome in one of two ways that you have tried:
    1) by the use of a policy file, or
    2) by signing the applet
    So, to answer your question:
    My question is this: why is needed a policy file to add a provider and not to open a ServerSoket or read/write a file???????Since the applet is signed, there is no need for a policy file......if you tried to access the socket without signing the applet, you'll get the security exception!
    ;o)
    V.V.

  • A somewhat simple security question......

    If a mac running macosx has two separate user accounts, lets say one admin and the other a standard user, or both admins or both standard users.....
    Is it possible for a hacked/penetrated account on one of the users to affect or read any info from the other user on the same machine ?
    What application is in question; Safari lets say.....

    FLUIDNYC wrote:
    So, disable all scripts and uninstall all plugins from the browser.
    No java, No javascript, No plugins like flash, java, shockwave, quicktime, or adobe crap.
    So, no functionality. What about that java applet I need to run 10 hours a day. Do you think I should go out of business over it? Or all my QT movies? Or, deprive myself of Flash, so I can't view the content of websites?
    So, lets say you browse www.thissiteisinfected.com and have everything uninstalled (see above), and your smart enough to browse the web using a "STANDARD" user account and not the "ADMIN" user account.
    Running from a standard user buys you nothing and adds additional steps. If you want to download an app, before you install, you will get a dialog warn you "XXXX is an application you downloaded from the internet..." So, you still have to authenticate. And what about *all the apps that need no authentication to install?*
    You tell me how this website will inject crap into your MAC with the settings above???
    There is no way to FORCE CODE into your browser if everything is disabled.
    Tell me how it can "inject crap" into my "Mac" admin without my complicity.
    I have bumped into a rouge antivirus website while on my macbook using safari.
    All of a sudden a popup stated i had spyware, i could'nt close the box/window, I had to do a FORCE QUIT on SAFARI to get out of that page. It pretty much hijacked SAFARI.
    This is nothing that can harm you. It is annoying having to force quit over it, but that is all.
    My safari download settings place things on my desktop, sure enuff, there was a .EXE file sitting on my macbooks desktop.
    Sure enough, your Mac can't do a thing with it.
    NOTHING IS BULLETPROOF.
    I agree but there are simpler ways to plant a rootkit you overlook, that have nothing to do admin accounts or ports. *The question is, who would want to?* Even if a black hat is randomly hunting for bank account numbers, social security numbers, credit card numbers, etc. he would pass up a UNIX based system with good protections in place for an easier target.
    In short, in a home environment, I could never recommend running from a standard user. Especially if they are on a router and/or using OS X firewall. (The exception being if you have kids and want to use parental controls.) I have no idea how this mantra about using a non-admin account started, there is no place where Apple recommends this.
    -mj

  • Simple Query Question - How do I return the Last 3 records of a Table?

    Question.
    For example, I have a table that has 50 records.
    How do I, specify in SQL to only return the last 3 records of the table.
    Select a.* from table a where ????

    I was just trying to show an example to a friend on
    how something like this would work and if it was even possible. But it won't work. Here's a simple example:
    SQL> create table emp
      2  (id)
      3  as
      4  select object_id
      5  from   all_objects
      6  order  by object_id;
    Table created.
    SQL> select *
      2  from  (select rownum rn
      3               ,b.*
      4         from   emp b)
      5  where  rn > ( select (max(rownum) - 3)
      6                from    emp)
      7  ;
            RN         ID
         40830      55891
         40831      55892
         40832      55893So far, so good. These are the "last 3" rows inserted. Now delete a bunch of rows and insert 3 new ones:
    SQL> delete emp where id < 40000;
    33423 rows deleted.
    SQL> commit;
    Commit complete.
    SQL> insert into emp values (60000);
    1 row created.
    SQL> insert into emp values (60001);
    1 row created.
    SQL> insert into emp values (60002);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select *
      2  from  (select rownum rn
      3               ,b.*
      4         from   emp b)
      5  where  rn > ( select (max(rownum) - 3)
      6                from    emp)
      7  ;
            RN         ID
          7410      55891
          7411      55892
          7412      55893Here's the problem. Even though the "last 3 rows" are 60000 - 60002, I still get the same ones as the first query.

Maybe you are looking for

  • How can i check for corrupt data

    I have a lot of machine embroidery designs stored on my imac and have reason to believe some may have corrupt data which is not evident when opening but has caused major damage to memory board in sewing machine. Is there anyway to scan for corrupt fi

  • AP Check Printing Methods

    Dear All, If check is printed one time then next time printed check will not be shown or display in check report. Is Oracle provide standard solution for it. I also developed report in rdf fromat , But it did not create restriction on printed checks.

  • Wireless connection

    Using Windows 7. I cannot keep a connection between my HP 6700 wireless printer and my laptop or ipad. Prints one time but won't print the next. Says there is no connection.

  • How to display an Image corresponding to it Material Number.

    Dear All, I have a  question .. Is it possible to display a Material image .. corresponding to a Material Number in MM01. EX: matn = 123 and for which there's a corresponding material image. How can i achieve this ? Can u please provide me with some

  • Photoshop & iPhoto 6 Users.../Initial response to Dual Core

    Helpful hint...Go to your preferences in iPhoto and I think under the "general" preference tab, you can tell iPhoto which application you want to edit photos in. I selected Photoshop, since we merely use iPhoto to store pictures somewhere. iPhoto 6 d