Newbie needs help creating folder with different date buckets

A simplification my scenario, I have a table, Invoice, which contains invoice amounts and invoice dates. I want to break up the invoices amounts into date buckets, such that my target report should look something like this:
Invoices<30 Invoices<60 Invoices<90 Invoices>90
$100 $250 $500 $1000
I have created a folder from the Invoice table, and would like to know if it is possible to create new items within this folder to allow me to sum invoice amounts over the 0-30, 30-60, 60-90, 90+ invoice date ranges. In other words, can I create new items that each have their own condition?
I have seen other solutions that use a custom folder backed by a SQL query using case statements to break a table down into its date range buckets. Is this considered the "right" approach to the problem?
A simpler solution I've thought of is creating a folder for each date range (Invoices30, Invoices60, etc), and setting the condition of the folder to do the date filtering. The item "Invoice Amount" in each folder ends up being the bucket I want, and I would put them together in a complex folder, and build the report off the complex folder. Although inelegant and a bit redundant, would this solution work?
Thanks everybody!

Hi Newbie
You can do this right inside Discoverer using a couple of calculations.
Calc 1:
=====
Calculate the invoice date variance, let's say you will use TRUNC(SYSDATE) - TRUNC(INVOICE DATE). This gives you a number and let's call this new calculation VARIANCE.
Calc 2:
=====
This second calculation created the buckets themself. Let's do it using a CASE statement and we'll call the calculation TIME BUCKET.
CASE
WHEN VARIANCE <= 30 THEN "0 to 30"
WHEN VARIANCE <= 60 THEN "30 to 60"
WHEN VARIANCE <= 90 THEN "60 to 90"
ELSE "More than 90"
END
You now display only TIME BUCKET in your workbook. The other calculation, VARIANCE, will be used but not displayed on screen in the final answer.
If you don't like CASE, here's the same answer using DECODE:
DECODE(VARIANCE,
LEAST(VARIANCE,30), "0 to 30",
LEAST(VARIANCE,60), "30 to 60",
LEAST(VARIANCE,90), "60 to 90","More than 90")
By the way, when you do this you will find that Discoverer runs your report very fast. This is because it can handle these types of queries exceptionally well.
I hope this helps
Regards
Michael

Similar Messages

  • I have multiple itunes libraries in my itunes folder with different dates. how did this happen?

    im trying to figure out why songs randomly disappear from my actual itunes. when i check the itunes folder on the drive, there are several versions with different dates. I didnt intentionally create these multiple libraries and i dont know how to open them to look for missing music

    Settings/Store worked...thanks Lawrence

  • Need help creating script to clear data with user inputs

    Hi experts.
    I need to create a script to clear data in a DEV system from a particular junction.
    Basically, I need the user to enter a CATEGORY, ENTITY and TIME which will then be used to delete all data in a particular table which meetes those criteria.
    I tried to write it in SSIS, but can't get a user input box.
    Also, Stored Procedures are not designed to open input boxes for these entries.
    Therefore, is there a way to do this in BPC script logic?
    I believe that I might be able to write either a Stored Procedure or DTSX package and then pass data from BPC Run Package?
    If this is correct, how would I go about it?
    Also, would it be possible to read the DISTINCT entries for Category, Time and Entity and present as a dropdown list?  (It doesn't matter too much if not, a manual entry would have to do).
    I will admit that I have no experience of script logc, so any docments and/or pointers would be appreciated.
    Thanks

    Thank Karthik, but I can't use the clear for this job.
    Specifically, I need this to delete from the LCK tables whenever data gets stuck, so if anyone can tell me the format to use, I'd be extremely grateful
    (And I appreciate that this is not recommended, but it's a DEV system and we need a way to clear these locks quickly when they occur)
    Edited by: Pie Eyed on Oct 1, 2011 2:54 PM

  • I need help creating documents with framemaker 9

    I have been using Words for all the manuals that i have created and i need to transfer them into framemaker and then be able to rewrite them directly into framemaker. I need some help with that please

    Anna,
    You might want to have a peak at some of these tutorials and papers:
    http://www.adobe.com/devnet/framemaker/articles/word_conversion.html
    http://www.techknowledgecorp.com/public/word2frame.pdf
    http://www.io.com/~tcm/etwr2472/guides/frame/frame6/frame_conversion6.html
    http://www.ivanwalsh.com/2009/10/how-to-convert-microsoft-word-documents-into-adobe-framem aker/
    There's also an online webinar [nominal fee] coming up on Feb.10th presented by Shlomo Perets that will be covering this topic. [Highly recommend]
    See: http://www.microtype.com/training.html#ImproveFM

  • When importing, creates folder with wrong date

    I found a curious bug in Lightroom 4.2.
    If I have pictures taken after 23:00, Lightroom creates an import folder in the next day, but the dates in the files are correct.
    Example:
    The file's date is: 29/11/2012 23:19.
    However if I hover my mouse over the image in the import dialog:
    The date that appears is 30/11/2012 00:19. Here's the detail:
    After you import, you get the image in the wrong import folder, but the meta on the image is correct:
    I've started to notice this before, but always thought of a wrong date on my camera. Just noticed that this happens with my camera, iPhone, and any other photo that has a time after 23:00.
    Do you know if there is a solution for this?
    Thank you in advance,
    Manuel Azevedo

    Does your computer time match with your camera time? Summer-/winter-time apart?
    The reason, why I am asking this: the map module auto-assumes that these times match (rather than asking you in which UTC-time zone your image time stamps should be interpreted when tagging from a gpx-track).
    Could be that something similar is happening in import module if you let LR auto-create destination folders based on date-time.
    I have no experience with this as I prefer to explicitely give the names of the new destination folders myself.
    Cornelia

  • Newbie needs help creating folders

    Hi, just bought my first Mac yesterday! YEA!! I am trying to navigate my way around here, but have a question about folders in Mail.
    I have been a PC user for MANY years and in my Outlook, I created folders to move messages to when they came from certain people or contained certain information. For example, I had a "financial" folder set up so that when any banking or other financial related information came in, the rule set up would move the message to that folder.
    Of course, I am trying to do the same thing here and I can't seem to figure it out. Will someone help? I want to create the folder and then set up a rule to move those messages. Thank you so much!!

    folders are called mailboxes in Mail. you can create them from Mailbox menu. you can also create a smart mailbox which is just a saved search.
    you can make rules to automatically move incoming messages to certain mailboxes based in criteria you specify. that's done in mail preferences->rules.

  • Need Help creating form with checkboxes

    I am using Acrobat Standar 9, and I am trying to create a form that has a bunch of checkboxes on it.  First off, the PDF that I am workin with (before I try to input form stuff) is a check list that has spots for marking (if it was printed out).  Acrobat will recognize all of those places as spots for a form tool, but it always inserts textboxes.  I want it to insert check boxes.  So far all I can do is delete all of the textboxes that were inserted and manually, one by one, insert check boxes in all of the locations.
    Is there a way to make the wizard input checkboxes instead of text boxes?  If not with the wizard, is there any way to do that?  (I am not familier with programming languages.. fyi)
    thanks

    Thanks for getting back to me. What I have is a pricing page. The feedback form is so we can see who views or is interested in services. We want only people who fill out this form to be able to view it. I have created simple contact forms that are sent to an email and directed to another page. The problem I am having is trying to figure a way to where hopefully if the same person comes back they won't have to fill out the form again. I know if they fill out the form and create a user name/login it could be a possible fix but I am trying to make it simple. I am just starting to learn PHP/XML (which I have copied from another sources) and haven't written my own. Maybe creating a cookie that is checked once the page is loaded? I have no idea how to do that either though... I am a front end "designer" and a lot of this is greek to me.

  • Need help creating component with 'application.createComponent'

    I am trying to create a button component by doing the following
    application.createcomponent("javax.faces.command") ;
    However it does not seem to work. I can create pretty much any other component by this method but for some reason I am unable to do this with the 'javax.faces.command' component family. Shouldn't this work?

    I think that the component type of the commandButton is "javax.faces.HtmlCommandButton"

  • Need help creating trigger with delete capabilities

    I have two tables:
    create table person(userid integer,
    lname varchar(20),
    fname varchar (20),
    phone_number varchar(12),
    email_address varchar(35),
    city varchar(20),
    zip_code varchar(20),
    department varchar(20),
    major_street varchar(20),
    cross_street varchar(20),
    notes varchar(100),
    Primary Key (userid));
    create table vehicle(car_id integer,
    make varchar(15),
    model varchar(20),
    year integer,
    gas_mileage integer,
    capacity integer,
    owner integer,
    primary key (car_id),
    foreign key (owner) references person (userid));
    I am trying to create a trigger that would delete all those records in vehicle whenever someone deletes a record in the person table. Here is the code that I run but it get a compilation error. Here is the the trigger text followed by the error:
    CREATE OR REPLACE TRIGGER ON_DELETE_PERSON
    AFTER DELETE ON person FOR EACH ROW
    BEGIN
    DELETE from vehicle
    where owner=userId;
    END;
    2/4 PL/SQL: SQL Statement ignored
    3/19 PL/SQL: ORA-00904: "USERID": invalid identifier
    Any suggestions?

    CREATE OR REPLACE TRIGGER ON_DELETE_PERSON
    BEFORE DELETE ON person FOR EACH ROW
    BEGIN
    DELETE from vehicle
    where owner=:old.userId;
    END;

  • Need tech help creating project with PE11, Windows 7

    I still need help creating a slideshow set to music for DVD playback at my 50th high school reunion. 
    Video Media = 700 still images in .jpg or .tff format.  Pixel sizes range from 200x200 to over 3000x4000.
    I first created this project using PE's presets and original image sizes.  Images added to PE were more blurred than originals & images burned to DVD were even more blurred so I asked for advice.
    Last week several people in the forum tried to help.  I really appreciate everyone's suggestions but would still appreciate further advice. 
    Forum experts said to restart my project with project settings changed to DV 720x480...and to resize my images to 1000x750 pixels.  Then today in a PE11 chat session, I was told something different: use project settings changed to DVD 720p 30 and resize only larger images down to 1280 x 720 (leave smaller images alone). 
    So what project settings and resizing should I use for better image clarity?  How do I change project settings?  By clicking on "new" under "file" >change project settings >DVD 720p 30 or something else?

    Up-rezzing small Still Images, regardless of the program and the Scaling algorithm used, can lead to a diminished quality. As Steve says, pixels are created, where none existed. I try to stay away from up-rezzing, whenever possible, due to that diminished qualtiy.
    If I have to work with very small Images, I often use another workflow, and a different asethetic choice. When faced with the prospect of using small Images, I will create a background of some sort (many options here), and then use that small Image at its original size, "framed" within that background - no Scaling involved, but obviously, that small Image will not fill the screen. The viewer usually has fewer problems with the small Image, than one that is larger, but has started to fall apart, due to the up-rezzing.
    One "trick" that I use is to use that small Image AS the background, but alter it greatly, probably dropping its contrast and upping its brightness, and even adding a Blur to it, then do a PiP (Picture in Picture) of the Image at its original size. I might even create a "picture frame" in Photoshop, to really set that small Image apart from the background. That is but one of dozens of such possible treatments, and one is only limited by their imagination.
    Another possible treatment would be to do a "photo wall" with several of the small Images in say a 3 x 2 matrix of PiP's. Sort of like a Contact Sheet.
    Good luck,
    Hunt

  • Needs help to know the different versions of forms with their compatibility

    Needs help to know the different versions of forms with their compatibility with different databases and operating systems.
    Kindly give the details or any suitable link for the same.
    please consider it as on urgent basis.
    regards,
    rajesh

    Rajesh,
    the certification matrix is available on metalink.oracle.com. You need a support contract to access this information.
    Frank

  • How can I share the home folder with different accounts on the same mac?

    Hi, here's a question:
    How can I share the home folder with different accounts on the same mac?
    The whole point being not to have to install all my apps, and move all my files each time between users.
    The second thing would be to be able to modify one document on one account, and have it changed on the other account without having to copy it.
    I would like to have a pro and a private account on my mac.
    Thanks for you answers,
    Doug

    Your apps should not be installed in your home folder--they should be in /Applications where every user can access them.
    If you want to share things between users on the same Mac, use the /Users/Shared folder. Keep your home folder private. Trying to defeat the protections on the home folder subfolders just gets messy. I've never bothered to figure out all of the problems associated with it so I can't explain how to do it.
    Even with using Shared, you would need to alter the ACLs on the shared folder in order to allow both users to modify the documents.
    You must create a Group in Users & Groups and put each user in that group. Then create a folder inside /Users/Shared where you want to share the various files.
    Then, add an ACL to the shared folder that gives the group special permissions. on that folder.
    sudo chmod -R +a "<sharinggroup> allow delete,chown,list,search,add_file,add_subdirectory,delete_child,file_inherit,directory_inherit" /Users/Shared/<sharing folder>
    Replace <sharinggroup> and <sharingfolder> with the name of your group and your folder. Then, run the command in the Terminal.
    With that ACL, each user in <sharinggroup> will be able to alter the files created by any user in the group in that <sharingfolder>.
    Essentially, the client OS is not designed for true file sharing among the individual users. It is designed to isolate each user account from the others.

  • MacBook - Newbie: Need help on printing wirelessly to XP shared printer

    MacBook - Newbie: Need help on printing to XP shared printer
    Bear with me please. I read tons of articles on this but somehow as a newbie to MAC (girlfriends sick daughter), I am missing something. 10.5.2
    Currently, she can print directly if we plug in the HP Deskjet printer directly via USB to the MACBook. No problem.
    When we first got the MACBOOK I tried setting up the MACBOOK wirelessly to recognize the workgroup where the printer was attached via USB to the Windows XP PC. However it printed out garbage since I did not know there was a difference between XP printing and MAC (Gutenberg/gimp printing/drivers).
    Now I know there is a difference.
    But in reading various instructions, I no longer can find how to connect the MAC to the Windows workgroup. Note we do have a printer set up currently as USB-HP Deskjet on the Macbook (not sure I need to delete it yet).
    I went to System Preferences on MACBOOK and clicked on printers, more printers. In the drop down box was CANON, APPLETALK, IP HP printing and Firewire. There was no WINDOWS selection as I saw in other online web instructions.
    So not sure how to proceed to find a way to:
    1. Connect to Windows workgroup (click on what exactly), step by step please!!
    2. Add correct HP Deskjet 5490 printer (perhaps there is one with Gutenberg or perhaps I need Gutenprint-really not sure what I am talking about)
    Thanks so much in advance. Fiancé's kid has had her cancer recur in a different place and someone was nice enough to buy her a MACBOOK as a gift.
    Sincerely
    Peter

    ccarbery wrote:
    OK...I figured it out...no need to reply.  I noticed that there was another Protocol to use to set up the printer on the Mac, I was using LPD, so I switched it to HP Jet Direct-socket, and it prints fine...thanks.  I am curious as to why LPD wouldn't work; if anyone has that answer I would like to know...thanks
    Any chance of posting the Protocol you used to connect to your printer with your laptop?  I'm have the exact same problem printing from my MB.  Same error message "..is busy".

  • Need help! Can't validate date overlaps for a tabular column

    Hello all,
    The validation I created to validate whether new or updates rows does not overlap with any records in the table isn't working.
    The columns are StartDt and EndDt
    Validation Type: NOT EXISTS
    Validation expresion:
    select 1
        from  sample S
        WHERE S.STARTDT BETWEEN :STARTDT AND :ENDDT
    OR(S.ENDDT BETWEEN :STARTDT AND :ENDDT)
    or (S.STARTDT <= :STARTDT and S.ENDDT >= :ENDDT)
    or (:STARTDT <= S.STARTDT and :ENDDT >= S.ENDDT)
    Error Message:
    Times overlap
    When Buttons pressed
    -Select Button-
    The validation works if a new row or updated row overlaps any existing start and end date records but it doesn't work if I update startdate and end date rows that doesn't overlap existing date times
    Example:
    TABLE DISPLAYS THE FOLLOWING RECORDS
    NAME                   START DATE                      END DATE
    TEST                    1/1/2012                               12/31/2012
    If I update the rows to the following values, I receive an error message (although those values don't overlap any records in the table)
    NAME                   START DATE                      END DATE
    TEST                    6/1/2012                               10/30/2012
    Any ideas? Do I need to change my code?
    Click the link to view the answer to this question. Need help! Can't validate date overlaps for a tabular column
    Message was edited by: CharlieMack

    Logic for date range overlap testing only requires two conditions in the WHERE clause:
    ORACLE-BASE - Overlapping Date Ranges
    WHERE S.STARTDT <= :ENDDT AND S.ENDDT >= :STARTDT -- TRUE for ranges that overlap
    It looks a little odd, but, if you scribble out a 'logic table', it makes sense.
    Condition
    A.start <= B.end
    A.end >= B.start
    A__A B--B
    true
    false
    A__B=A--B
    true
    true
    A__B==B__A
    true
    true
    B--A==B__A
    true
    true
    B--B A__A
    false
    true
    MK

  • I have multiple devices backed up to the same computer each with different data. how do i keep them from syncing all data when i back up or transfer stuff from the computer to a device?

    i have multiple devices backed up to the same computer each with different data. how do i keep them from syncing all data when i back up or transfer stuff from the computer to a device? one is an iphone 6 and the others are ipad mini first gens, each ipad has 64gb and the iphone has 128, need to keep the data seperate as they are not all mine

    Itunes content and pics are NOT part of the backup that itunes performs.
    Backing up, updating, and restoring iPad, iPod touch, and iPhone software
    You should transfer any purchases from iphone regularly:  File>Transfer Purchases  , if they fail to be transferred when you sync.
    You buy one and only one download.  It is your responsibility to move/copy/backup your purchases.
    You can try contacting itunes support and asking for an exception, but they are under no obligation to allow.
    http://www.apple.com/support/itunes

Maybe you are looking for

  • Expression help in SSIS!!!

    Hi, I have the below expression: ISNULL(@[User::PROCESS_DATE]) || TRIM (@[User::PROCESS_DATE]) == "" ? "1900-01-01" : (@[User::PROCESS_DATE]) == SUBSTRING(@[User::PROCESS_DATE],1,4) + "-" + SUBSTRING(@[User::PROCESS_DATE],5,2) + "-" + "1" i get the f

  • Library items

    can i use library items in the same way as i can cfinclude or an html insert i realise these are server side actions but i want to know if it is possible to have links in the library which can be updated on the page4s what are the possibilities and d

  • Steps after track creation

    Hello experts, I need some help with configuring a track for 7.4 development. I created a track for 7.4 development and made sure all necessary software components and their dependencies are defined in sld. As I read lots of documentation on creating

  • IPod Touch 4G and iPad 2 won't update to iOS 5?

    Hey, I have an iPod Touch 4G and iPad 2 that are both running. 4.3.5 and I am trying to update to iOS 5. I downloaded it for both devices and clicked update, it backs up the device, extracts software, and then say verifying restore with Apple. Then a

  • Newbie question - how to format timeline to not show hours?

    Hello - trying out Premiere after giving up on (gasp) iMovie I make very short videos - from 30+sec to 5 minutes.  I don't need the timeline to show so much detail.  The hours are meaningless. I also am not yet trying to sync audio with precision I d