Comparing a MaxDate with another Date field

Hi there,
I am trying to create a report that has  components on it, ReportDate, MaxReportDate, and JobID. I want to compare a max date with another date in my Web Intelligence report. For example, I have a field called Report Date. I have applied the Max() function to find the most recent date in the list of Report Dates. Therefore, I used this:
Max([ReportDate]) --> MaxReportDate
Then I want to compare the original Report Date field with the MaxReportDate and return the JobID if the ReportDate = MaxReportDate. Therefore, I used this for the JobID2 formula:
= [JobID] where (ReportDate = MaxReportDate)
This is not working. Am I doing somehting wrong? By the way, I am using SAP Business Objects BI Platform 4.0 Client Tools (version 14.0.2.364).
Please help! Thanks!
-Janice

I did create a variable called MaxReportDate with the formula Max(ReportDate). When I test this variable, it works perfectly fine. However, when I use it to compare against ReportDate, there's where it gets tricky. 
So it looks like the If ReportDate=MaxReportDate then JobID works. However, if I try to replace JobID with any other Measure variable, it does not return accurately. For example, say I have the following data:
ReportDate Price
11/30/2011  10
13/30/2011  15
I put it the following formula to get the price for the max report date:
If [Report Date] = [MaxReportDate] then [Price]
It should give me 15. Instead, it sums the numbers and I get 25.  Why is that?

Similar Messages

  • To compare date with another date in string in siebel bip report

    Hi,
    In my rtf I am comparing a Date1 with a date in string i.e. '10-NOV-14'. If Date1 is less than '10-NOV-14' I am dispalying a certain text and if not another text.
    This condition is working fine if Date1 have 2014 values but if  Date1 cointains 2015 date than the mentioned condition is falling.
    Kindly suggest any solutions.
    Regards,
    Siddhika

    This example may help:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0">
    <xsl:param name="currentDate"/>
        <xsl:variable name="firstDate" select="concat(substring($currentDate, 1,4),substring($currentDate, 6,2),substring($currentDate, 9,2))"/>
        <xsl:template match="/">
            <xsl:apply-templates select="//item"/>
        </xsl:template>
        <xsl:template match="item">
            <xsl:variable name="secondDate" select="concat(substring(submissionDeadline, 1,4),substring(submissionDeadline, 6,2),substring(submissionDeadline, 9,2))"/>
            <xsl:choose>
            <xsl:when test="$firstDate &gt; $secondDate">
                <xsl:call-template name="late"/>
                </xsl:when>
                <xsl:when test="$firstDate &lt; $secondDate">
                    <xsl:call-template name="ontime"/>
                </xsl:when>
                <xsl:when test="$firstDate = $secondDate">
                    <xsl:call-template name="same"/>
                </xsl:when>
                <xsl:otherwise>Monkeys<br /></xsl:otherwise>
            </xsl:choose>
        </xsl:template>
        <xsl:template name="ontime">
            This is on time
        </xsl:template>
        <xsl:template name="late">
            This is late
        </xsl:template>
        <xsl:template name="same">
            This is on time
        </xsl:template>
    </xsl:stylesheet>

  • How to get the exact day date with the another date field?

    Hi,
    Please help me how to get the specific day of the week's date with the help of another date field.
    Actually , one field(week_day) has 1,2,3,4,5,6,7 here 1--MON,2-- TUE like that.
    another field has the date. based on that date, we have to go to that particular week and need to pick up the date by the above week_day. It should be in that week itself.
    Thanks in advance!!
    Regards,
    Vissu...
    Edited by: vissu on Oct 29, 2010 3:07 AM

    Hi,
    Something like this
    SELECT TRUNC(<DATE_COLUMN>,'DAY')+<WEEK_NO_COLUMN> FROM <YOUR_TABLE>;for the particular week of the date
    SELECT TRUNC(SYSDATE,'DAY')+<WEEK_NO_COLUMN> FROM <YOUR_TABLE>;for the current week
    cheers
    VT

  • Billing report with due date field

    Dear Friends,
    Can you please tell the logic of Billing report with due date field.
    Input.  billing document no, date range, sales organisation
    Output : billing document no, sales organisation, Amount. Due date.
    If any clarification required, Please let me know.
    Thanks in advance
    Ranjan

    Is it VF05 is suffiant for your purpose?
    use further selection criteria tab.
    Amit.

  • I am using iphone5s.some time the iphone is showing less signals?when i compare my phone with another phone by keeping side by side the signals are very less?

    am using iphone5s.some time the iphone is showing less signals?when i compare my phone with another phone by keeping side by side the signals are very less?

    Are both phones by Apple?
    I had a Nokia previous to my iPhone 5 & noticed that on the Nokia I had 3.5G signal & 4 bars out of 5 yet on the new phone it shows 3G & 2 or 3 bars, rarely it reaches 5 while outside.

  • Help with a date field script

    Sorry if this is a repeat. I was interrupted and found that my browser had crashed when I came back so I'm not sure if the question got asked.
    I need a script for a date field (mm/dd/yyyy) where the user can only fill in a date that is between 12/31/1899 and the current date (whatever the date when the form is opened). I'm getting better at writing these but I haven't been successful with this one. Any help would be greatly appreciated.
    Thanks!

    I have a feeling I already answered this question some time ago... Anyway, you can use this code as the field's custom validation script:
    var minDate = util.scand("mm/dd/yyyy", "12/31/1899");
    var maxDate = new Date();
    event.rc = true;
    if (event.value) {
        var d = util.scand("mm/dd/yyyy", event.value);
        if (d<minDate || d>maxDate) {
            app.alert("Error! The entered date must be between " + util.printd("mm/dd/yyyy", minDate) + " and " + util.printd("mm/dd/yyyy", maxDate));
            event.rc = false;

  • Is anyone else having problems with Apertures Date fields?

    After experiencing a sysems failure I began restoring my images from backups.  I have had no end of problems with Image dates.  I have come to the determination that Aperture is NOT using either the "Create Date" or "DateTimeOriginal" as the image "Date" or "Date Created" data if other fields have other dates.
    Here is a clip from my image metadata using exiftool:
    File Modification Date/Time     : 2012:09:23 19:53:15-04:00
    File Access Date/Time           : 2013:01:16 11:34:38-05:00
    File Inode Change Date/Time     : 2013:01:16 11:31:32-05:00
    Create Date                          : 2006:02:20 11:51:12.10
    Date/Time Original              : 2006:02:20 16:51:12.10
    Modify Date                          : 2006:02:20 11:51:12.10
    And here is what Aperture utilized on import
    Date:                               9/23/12 7:53:15 PM EDT
    Date Created                         9/23/2012 7:53:15 PM
    So Aperture utlized the File Modification Date/Time as the Create Date despite that the fact that the Create Date field is present and is properly formatted in the original image.
    According to the Aperture mapping table, this shouldn't be happening.
    Now, before someone recommends that I use Aperture's Date Adjust utility - I'm talking about  slightly over 30,000 images.  Editing images one at a time, or in blocks when you don't know what field Aperture is using as the Create Date would require individual inspection of each image followed by manual adjustment of each image.  That approach isn't acceptable.

    Hmm ok, let me restate the issue then, I thought I was clear.  I could have pointed out in my original post however, that only the EXIF and IPTC date fields were displayed from the metadata dump.
    The data set presented in my first post is the EXIF dataset from the file which clearly shows the image was captured by digital camera at
    Create Date                          : 2006:02:20 11:51:12.10
    Date/Time Original              : 2006:02:20 16:51:12.10
    (The delta of 5 hours is the result of Zulu versus local time offset)
    But, when I ingested it into Aperture, the import routine utilized the IPTC field
    File Modification Date/Time     : 2012:09:23 19:53:15-04:00
    which is updated by the OS whenever you move the file around outside of Aperture. (a number of image data fields are updated by the OS - filename for example is another.).  This resulted in the image date fields being stamped in Aperture as:
    Date:                               9/23/12 7:53:15 PM EDT
    Date Created                         9/23/2012 7:53:15 PM
    Which obviously came form the File Modification Date/Time field and not (either) the Create Date or Date/Time Original fields.

  • Is there a way to import a indd CS4 file with its Data Fields names and properties into CC?

    I have to convert numerous files from CS4 to CC. The CS4 files are using external data from a CSV file. When I open the file in CS4 I can enable the preview and see the data from the CSV file. But when I save the file as indd or idml and try to open it in InDesignCC then I can't see the data as preview. I can see the Data fields (text).I think it's because it doesn't recognize the data fields from the CS4 file. If I delete a data field and remap it I will be able to see the preview for the field I just mapped. the other fields remain the unchanged, like they were just text.
    Any help with this topic will be very appreciated. I have about 70 data fields per document and about 100 documents to go through.
    Update: The symbol for a data field, ex: «fullname_2» change size when I delete and remap it. Explanation: When I open the CS4 file in IndesignCC I can't view a preview of the Data field(s) (almost positive because it's plain text). The data fields show like this «fullname_2». But when I delete that and drag a field from the data field list it shows like this <<fullname_2>>. So definitely, CC is not reading the data fields from InDesign CS4.
    P.S.: The fields above («fullname_2» and <<fullname_2>>  are copy and paste from Indesign CC.

    I'm attaching this image so this forum can notice the difference on the Data fields from CS4 and the ones added on CC

  • How to create a group with multiple data fields

    Post Author: RichS
    CA Forum: Formula
    Using CR XI.  Using CSV input from ODBC text driver.  No problems here.
    There are 3 fields that I want the same group by action.  Is this possible?) 
    If any one of these 3 fields change I want some header information and column fieldnames to display.  The header information I only want displayed on the first page (on the change) and the column fieldnames to display on every page.  I have played around with things like "InRepeatedGroupHeader" and "report group header on each page".  I am not getting all the results that I am looking for though.
    I want report to look like:
    Page header stuff  (to display on every page)  This data consists of some fields that will have static data and will display on every page.  And it consists of 3 non-static fields that I want to group on. 
    Group header stuff that I only want displayed on the first page on a change from one of the 3 fields mentioned above.
    Column headings that I want displayed on every page.
    Details data
    Group footer stuff (details not important for this)
    I get the expected output (column headings displayed on every page, and group header stuff display on the first page on each group change) with one group field.  But I want the group change to happen for all 3 fields.
    It seems simple but I can't find a way to create a "group" so if "field1 or field2 or field3" change, I get the same "group by" action.  I just need to know how to get the expected action.
    I expect that I might have some terms mixed up and/or some important information that would aide you in helping me.  If that is the case please re-post and I will add any missing or mis-stated information.
    Thanks,

    Post Author: V361
    CA Forum: Formula
    I am slightly confused, but perhaps you can create a formula
    Then group on the formula.  If this is not what you want, could you post some sample data, with the desired results.

  • Weird errors with a DATE field in a certain row

    We have a table with an exp_date field of DATE datatype. One row is giving us mysterious problems.
    If I query the row in sqlplus, the exp_date field displays 18-Jun-04. The same query in Oracle SQL Developer displays 19-Jun-04. The same query in TOAD returns a NULL field, and adding "exp_date IS NULL" to the query returns no rows (since it really isn't NULL!).
    In sqlplus, if I use trunc() or round() on exp_date, it gets bumped up to 19-Jun-04.
    This field for this record is causing some issues in our java classes as well, we're adding some more logging/exception handling to find out exactly what they are.
    Any thoughts?
    FWIW this is on Oracle 10gR2 (10.2.0.2).
    Message was edited by:
    dtseiler

    what happens if you do the following on all three different environments:
    SQL> select to_char(exp_date, 'dd-mon-yyyy hh24:mi:ss') from your_table where your_condition ;
    [pre]

  • Problem with displaying Date field in the table.

    Hi All,
    I am trying to display data into a table UI Element. 
    In that data, i have one DATE type field. While displaying data in DATE field, it will display like this "01.02.2009".
    Now my requirement is if i want to modify that DATE field, it will allow to modify "01.02.2009"  to "26.02.2009".
    But while modifying DATE field , I want to show the Calender of that month, in that i  have to select the another date.
    (Like normal Date UI Element will show that calender).
    Can anyone please help me.
    Thanks in Advance!
    Regards,
    Sreelakshmi.

    Hi,
          Go to the context attribute that was mapped to the DATE field of the table and change the perperty INPUT HELP MODE to  AUTOMATIC and it works.
    Regards,
    Manne.

  • Issue with a date field

    Hi,
    I have a pl/sql page that is the output of a select statement with some conditions.
    One of the condition is like:
    AND MyColumn between (:P1_MyDateItem - 7 , :P1_MyDateItem)
    but as soon as I include an addition or substraction (:P1_datefield - 7) , I get ORA-06550: line 18, column 28: PL/SQL: ORA-00932: inconsistent datatypes: expected DATE got NUMBER
    How can I resolve that error?
    Also,
    I am trying to pass the date field to a second page in a hidden field. In a similar scenario as the one described above, how can I manipulate the date using the hidden field. ie. in my testing, I think it kind of converts the "date" into "char' format?? can I also do the same manipulation "Date-7" but this time using a hidden field instead?
    Thanks

    FabioBui wrote:
    but as soon as I include an addition or substraction (:P1_datefield - 7) , I get ORA-06550: line 18, column 28: PL/SQL: ORA-00932: inconsistent datatypes: expected DATE got NUMBER
    How can I resolve that error?Try converting it to a date first
    to_date(:P1_datefield, <date_format>)-7
    I am trying to pass the date field to a second page in a hidden field. In a similar scenario as the one described above, how can I manipulate the date using the hidden field. ie. in my testing, I think it kind of converts the "date" into "char' format?? can I also do the same manipulation "Date-7" but this time using a hidden field instead? Yes, if that's what you want to do. A date field is just a text box, made nicer with the jQuery Date Picker.
    so date picker:
    <input type="text" value="12/14/2011" />
    to a hidden item
    <input type="hidden" value="12/14/2011" />
    only difference being the display type.
    Just remember to convert it to a date in your pl/sql code.

  • Web services with xsd:date field

    hello everybody.
    i have a curious problem.
    I'l working with PI 7.1
    I made a interface soap to RFC
    In inbound message i have some field with type date.
    When i call web service all field are populated but date fiend no.
    I'm sure from web service client i do the call correctly!
    any suggestion?

    hi,
    When i call web service all field are populated but date fiend no.
    Are you getting  any error message while posting the soap message through the test client.What is the result when you test in message mapping test tab with the same test data.
    Are you able to do the RFC call properly when tested in message mapping?
    Please check if the date format you have mentioned in your structure is correct.
    regards,
    Srinivas

  • Problem with the date field in Table Control

    I have created a table control in my module programming. One of the column in the table control is a date field which is I/O field.
    Now if I enter a value in date field column and hit enter the date field is reset. I dont want the field to get reset and accept valid date field.
    I have set type of the column as DATS and I havent used any dictionary fields. The column is from the internal table in the program.
    Please suggest

    In your PAI, in the LOOP AT <itab> did you
    - check date validity
    - update internal table
    * Sample
    LOOP AT itab.
      FIELD itab-field MODULE checkfield.
      MODULE updateitab.
    ENDLOOP.
    Look also at SAP documentation like [Table Controls|http://help.sap.com/abapdocu/en/ABENTABLE_CONTROL1_ABEXA.htm] or [Table Controls in ABAP Programs|http://help.sap.com/saphelp_nw04/helpdata/EN/9f/dbac9f35c111d1829f0000e829fbfe/frameset.htm]
    Regards,
    Raymond

  • Help with Updating Data Fields in Merged Document

    I'm working in InDesign CS5 v7
    I have a multipage report, all using one master page for about 80  seperate records. Each page has their own linked graphs/images.
    We  now have need to alter the source data, and while these alterations can be seen in  'Preview mode' on the Master Page, they are not carrying through  into the pages themselves. No amount of 'Update Data Source' clinking changes this,  and the 'Update Content Data Fields' remains greyed out...
    I really don't want to have to remerge the whole document, as I will loose all of the linked graphs and images.
    Can anyone help?

    You've seen the other thread, so I think you already know the answer...

Maybe you are looking for

  • Camera Raw 6.5 - Lens Corrections

    Hello: I know a 50mm lens is more commonly used for portrait shots but I like that I can be "POSITIONED CLOSER" to the subject when using a 35mm lens. Camera Raw 6.5 >Lens Corrections >Profile Make and Model and Profile, recognizes both of my lenses.

  • How do I change the http connection type from close to keep-alive

    I am using a browser that appears as though it needs a connection type of keep-alive. When a page is requested the server sends back a connection type of close. It appears images are not requested from the server when this connection type is requeste

  • File already exists in catalog error message

    When trying to scan a photo into the PSE 8 Organizer, I get the message "The file already exists in the catalog".  It indicates the file c:/users/user/AppData/Local/Temp/PSAlbumImport/2014-02-23-1315-04/Image1.jpg.  This file contains the image that

  • How do I cancel an itunes movie from downloading?

    A rental From itunes.   Taken over 8 hours so far.  Battery won't charge

  • Do you know how to use .divx in iWeb ?

    Hi, I need some information for how to use .divx movie in iWeb. I try many things. Please Help. Thank you.