Compare - Current Data with Perious Data.

Experts,
We have created default report like below
Date - Company - Product - SCode - Amt Spent - Net Amt - Calls
12/12/2010 C1 P1 Code1 1000 1500 15
13/12/2010 C2 P4 Code2 1500 1200 10
12/12/2009 C1 P3 Code3 2000 1700 25
11/12/2010 C3 P1 Code4 3000 1600 10
11/11/2009 C2 P2 Code5 5000 3000 30
Grand Total 12000 9000 90
Here we are using Column selector for Date column to change the report from Date to Week (or) Month (or) Quarter (or) Year.
My Questions
1. I want to compare Default Date report with Perious Date, Last month Date and Last Year Date.
2. If I select Month from Column Selector then I want to compare Month report with Last Month, Last year Month or Perious of Last year month.
3. If I select Year from Column Selector then I want to compare Year report with Last year, or Perious of Last year and so on.
Please help me, how can we achive the above task.
Thanks in Advance.
Balaa...

Hello,
First you have to define the new measures for last month, last year and so on. You can refer to this link:
http://www.rittmanmead.com/2007/04/obi-ee-time-dimensions-and-time-series-calculations/
After that, what you can do is instead of using a "Column Selector" you should use "View Selector". You can create different views, one for month, other for Year and include them into a "View Selector".
After that you can add it in "Compound Layout".
Regards,
JorgeRS.

Similar Messages

  • How to compare current date with past date

    Sample code for comparing current date with past date
    i dont want to Calender.set method to compare it.
    How can i do it?

    PLEASE stay with ONE thread:
    http://forum.java.sun.com/thread.jspa?threadID=5143991&tstart=0

  • Best Approach to Compare Current Data to New Data in a Record.

    Which is the best approach in comparing current data to new data for every single record before making updates?
    What I have is a table with 5,000 records that need to be updated every week with data from a data feed, but I dont want to update every single record week after week. I want to update only records with different data.
    I can think of these options:
    1) two cursors (one for current data and one for new)
    2) one cursor for new data and one varray for current data
    3) one cursor for new data and a select into for current data.
    Thanks for your help.

    I don't recommend it over merge, but in theory you could use a checksum (OWA_OPT_LOCK.checksum()) on the rows and if they differ then copy the new row into the destination table. Or you might be able to use rowscn to see if things have changed.
    Like I said, I don't know that I 'd take either approach over merge, but they are options.
    Gaff
    Edited by: Gaff on Feb 11, 2009 3:25 PM
    Actually, rowscn between 2 tables may not be an option. I know you can turn a rowscn into a time value so if that rowscn is derived from anything but the column values for the row that would foil that approach.

  • Compare current date with dat from db by JSTL

    hi all
    I use
    <tr><c:forEach items="${allFound}" var="found" varStatus="myRow">
    <td><c:out value="${found.submitDate}"/></td>
    </tr>
    </c:forEach>
    to past some value out of db
    how can I compare this submitDate with Current Date by JSTL
    Thank you!

    Whether or not you can compare it depends on what the type of "${found.submitDate} is coming from the Database.
    I am going to presume it is a java.util.Date.
    You can get the current date like this
    <jsp:useBean id="now" class="java.util.Date"/>
    You can then compare them using an EL expression:
    {code}
    <c:if test="${submitDate < now}">
    We have not yet reached the submit date.
    </c:if>{code}
    EL uses the java compareTo methods, so both of your objects +must+ be of the same class in order for this comparision to work.
    If you get back a String from the database, you would have to use <fmt:parseDate> to get a java date.
    If you get back a java.sql.Date from the database, it would get trickier. The hack would be to go java.sql.Date -> String -> java.util.Date using <fmt:formatDate> and <fmt:parseDate>
    Hope this helps,
    evnafets

  • How to compare current time with any particular time?

    Hi All,
    Problem:
    I have a form which accept data from user but i want that user can enter data only before 4 in the evening after that no data will be accepted and user get any message. Now the problem is I want to compare the current time with 4 o clock or 16:00:00 but i dont know how to check whether the current time is greater or lesser than 4. Till now my code are like this: if(tt.equals("16:00:00")){}else{}
    where tt is current time. but this is not the feasible solution for my second clause.
    Any kind of help will greatly appreciate.
    Thanks

    One more thing:
    I find timestamp class quite helpful in my case but i
    dont know how to implement the before() method
    of this class.
    Any idea.* You wouldn't implement before(). You'd just use it. It's already implemented for you.
    * before() doesn't just compare the hour of the day. It compare two date & time objects to see which one is greater--that is, it effectively looks at all the fields, not just HOUR.
    * You don't need Timestamp if you're not dealing with a database.

  • Compare current value with previous value

    Hello,
    I would like to compare the current value with the previous value of the current value.
    How can I solve this problem?
    Maurits

    Hi,
    after going through the basics course you surely can understand that example:
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • SSRS Variance expression problem. Create a Variance expression. Compare current month with same month from previous year.

    Hello,
    I am using VS2010 shell.  I have a matrix report where I have a row group by Year.  Then I have a column group by Month. 
    When I run the report, I get 2013 data on top of 2014 data.  Now I need to create a variance by year for each month.
    So in the example below, I need to create an expression that will pull the variance for Oct 01... subtracting 2013 from 2014 for the months.  So I need to Subtract 8,222 - 4290.  I have no clue.
    Here is what my rdl looks like.
    Thank you for your help. 

    Hi Adrian,
    If I understand correctly, you want to calculate the difference order between 2013 and 2014 for every month. And there are only two years in the FISCAL_YEAR field.
    If in this scenario, we can simply use the following expression to achieve your requirement:
    =first(Fields!ORDER.Value)-last(Fields!ORDER.Value)
    The following screenshot is for your reference:
    If there are any misunderstanding, please elaborate the issue for further investigation.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • To compare current year with prior year

    Hi
    Please can you help me  to create proper sql to get the output like same as I attached herewith . it would be appreciate
    polachan

    You can do it in multiple ways
    1.
    SELECT COALESCE(t1.Company,t2.Company) AS Company,
    COALESCE(t1.Sales2015,0) AS CurrentYearSales,
    COALESCE(t2.Sales2014,0) AS PriorYearSales
    FROM Sales2015 t1
    FULL JOIN Sales2014 t2
    On t2.Company = t1.Company
    2.
    SELECT Company,
    MAX(CASE WHEN YearVal = 2015 THEN Sales ELSE 0 END) AS CurrentYearSales,
    MAX(CASE WHEN YearVal = 2014 THEN Sales ELSE 0 END) AS PriorYearSales
    FROM
    SELECT Company,Sales2015 AS Sales,2015 AS YearVal
    FROM Sales2015
    UNION ALL
    SELECT Company,Sales2014 AS Sales,2014
    FROM Sales2014
    )t
    GROUP BY Company
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to compare user entered date with current date

    Hi all
    my requirement is, user allowed select one date, in code i have compare this date with current day date. it should be 15days gap other wise display error message.
    I am worried about how to get current date in code. Is there any code to get current date. please reply me with code or mail me at [email protected]
    Thanx
    keerthi

    Keerthi,
    Use the method <b>getDifference()</b> of the DateHelper.java available here.<a href="http://www.koders.com/java/fid14A61FEB1B45A64E42E1DCAD7070B46AE46340BA.aspx">DateHelper</a>
    1. Create a new folder, say Util under your src folder. (com.xyz.util)
    2. Put this DateHelper.java file in that folder,(com.xyz.util) .
    3. Now, write an import statement for this java class in the required view.
    4. Use the getDifference() method of this class to the difference in days between two days.
    Or
    Simply use this code.
    // Get msec from each, and subtract.
    long diff = currDate.getTime() - selectedDate.getTime();
    int noOfDays = diff / (1000 * 60 * 60 * 24);
    where currDate is today's Date and selectedDate is the Date selected by the User.
    Bala

  • Compare Hiredate with Current date in PCR

    As per the requirement I have, a certain type of accrual needs to occur on the employee's anniversary date, this accrual should only happen on the first anniversary. How can I compare hire date with current date ignoring the year, and then ignoring the same logic from second year on-wards.
    Can someone please help me with the possible method of implementing this requirement in a time PCR.

    In my humble opinion, I think that you should achieve that by means of an ABAP program, it should be scheduled to run every day and compare the hiring date with the current date of every employee, then create a batch input to Infotype 2013... it would be easier to track and monitor, since you would have all logs in SM35
    Best regards,
    Federico.

  • How to compare date with thr current date

    Hi,
    I have an inout string which is in date format(dd/mm/yyyy hh:mm:ss) .
    what i need to do is comparing this date string with the current date. if my input string is less than current date , then display error message..
    how to do this?
    regards

    Excellent suggestions from all of you people!
    finally i got the solution
    code is:
    import java.util.*;
    import java.text.*;
    public class TestDate {
      public static void main(String args[]){
        TestDate a = new TestDate();
      TestDate() {
        String DATE_FORMAT = "dd/MM/yyyy hh:mm:ss";
         Date today = new Date();
         Date myDate=null;
        java.text.SimpleDateFormat sdf =
             new java.text.SimpleDateFormat(DATE_FORMAT);
         try{
         myDate = sdf.parse("01/06/2006 00:00:00");
         }catch(Exception e) {System.out.println(e);}
        Calendar c1 = Calendar.getInstance();
        Calendar c2 = Calendar.getInstance();
        c1.setTime(today);
        c2.setTime(myDate1);
        System.out.print(sdf.format(today));
        System.out.print(sdf.format(c1.getTime()));
        if (c1.before(c2)) {
           System.out.print(" is before ");
        if (c1.after(c2)) {
           System.out.print(" is after ");    
        if (c1.equals(c2)) {
           System.out.print(" same as ");    
    System.out.print(sdf.format(c2.getTime()));
      }

  • Compare current time and date with last modified?

    Compare current time and date with last modified?
    What is the ideal way to compared the last modified from the File class with the current date and time? last modifed value from File class is a long.

    798642 wrote:
    So what do I do to compare whether the current date and time and later than the lastModified ?
    if(file.lastModified() < System.currentTimeMillis()) {
    Like that?That tests whether the last modified time is before "now"--that is if the file was not modified in the future, so, yes.

  • How to get the current date and compare dates

    hi
    does anyone know how you would get the current date?
    furthermore, how to compare the current date with a past date to see how many days or months have past since then?
    thanks

    have a look at the Date class. new Date() creates an object containing the exact date and time at creation time. (Date).getTime() might be useful for comparing two dates. GregorianCalendar might be useful, too.

  • Check the modification date of a file and compare it to the current date

    Hey everyone,
    I'm writing a script that compares the modification date of a file to the current date, and performs actions based on whether the file was modified 7 days ago or not. I haven't been able to figure out exactly how to do this.
    I haven't been able to find much in the way of this online, and I am not that familiar with manipulating dates and whatnot. I was able to get a bit of it, posted below:
    currentDate=`date +%b-%d`
    fileDate=`ls -l ~/.backup.txt | awk '{ print $6, $7 }'`
    echo "$fileDate"
    echo "$currentDate"
    if [ "$fileDate" <= "$currentDate" ]; then
    echo "old enough to run script"
    else
    echo "not old enough yet"
    fi
    Of course, this doesn't work. Any help would be much appreciated. This is for Leopard.
    TIA,
    Andrew

    find ~/.backup.txt -mtime +7 -exec yourscript {} ;
    You may need to play with the +7 value to get the exact number of days old the file needs to be.
    The find command will accept a directory (actually it is frequently used with directories) and will find all files in that directory and any subdirectories below that match the find selection critiera.
    So you could do something like
    find ~ -mtime +7 | xargs yourscript
    or
    find ~ -mtime +7 -name "*.txt" | xargs yourscript
    and if your script does not accept multiple filenames on the command line, you can use
    find ~ -mtime +7 | xargs -n 1 yourscript
    and if your file names have spaces in them, you can use
    find ~ -mtime +7 -print0 | xargs -0 -n 1 yourscript

  • Current date in BO queries with Universe built on Infocube

    Hi dear experts,
    We are facing the following issue :
    - we built a universe on top of a multiprovider (with 2 infocubes) since we don't want to manage BW Queries.
    - we need to restrict data on WebI queries using current date or system date (to compare with a date from the universe)
    No options to do that seem to be available through MDX in the universe.
    Has anyone already solved such an issue and how do you proceed?
    Thanks for your help.
    André

    Hi Andre,
    I assume you are aware that you are losing items when connecting to the cubes directly, such as restricted keyfigures, calculated keyfigures, variables, structures, navigational attributes, and the option to use authorization variables.
    In the universe right now you don't have an option to reference something like a system data - that is done with an EXIT variable in the query.
    Ingo

Maybe you are looking for

  • Run time error while saving values in File (Tcode)

    Hi, I am using FM   call function 'FILE_GET_NAME'        exporting             logical_filename = logical_filename             parameter_1      = program_name             parameter_2      = file_id_param        importing             file_name       

  • Getting a Message EVERY TIME I open a downloaded file

    Okay, I download all the time for my Sims 2 game. The format of the files I download are .package files, and used a program called package installer to open. Every time I open one of the files, it gives me this stupid warning telling me that they mig

  • External Monitor display issue

    The external monitor for my mac book pro displays large/wide text when both screens are open.  If I shut the laptop, the external monitor display returns to a normal view.  I tried going to system preferences, displays and it's either on best for dis

  • How to use iPod as a DICTATION MACHINE?

    I am about to purchase an Ipod, probably the 80 GB, and would like to know how I can use an iPod as a dictating machine, with the ability to start, stop, fast forward and fast rewind. Is there hardwware and software to that effect? Thank you very muc

  • Recommendations? USB 2.0 & Firewire PCI card for MDD Dual Boot G4 (1.25 Ghz

    Can anyone recommend a good USB 2.0 and Firewire combo PCI card? (at least 3 USB 2.0 ports and 2 FW) for my G4 MDD Dual Boot- 1.25 Ghz)? I have an Orangelink+ Micro USB 2.0/FW PCI card from the days of OS 9- that's supposed to be USB 2.0 under OS X,