Field calculated MDB a max date using rank

Hello

I need to get a maximum date within projects, and the date max must be a computed column. In the database there is the query I would use, how can I implement this in BMM, need help please, let me know if there is another way?

Select a.commitment_date from
(SELECT project, stage_id, commitment_date,
DENSE_RANK() over (PARTITION BY project ORDER BY commitment_date desc) as rank
of prod_detail) a
Where rank = 1 a.project_id group;

Thanks for your time and your help.

Hi ssk.

Your query in the DB online help, you can do 1 thing directly use this query in the physical layer and go to the-> new physical table and choose table type-> select and write SQL inside and paste this query it and joins appropriate to this table so he realized the extraction you want. So draw from this table to also be layer MDB.

(GOLD)
Take a new calculated column in the layer of MDB write it as max (commitment_date) and check the query SQL generated by BI server when you use this column in your application, by default, need to add group by clause adding columns to it.
If you want to change the group by according to your requirement, and then go to the advance in the response criteria, find you the section group you specify a.project_id and check the results.

Award points and close your previous message also @ssk field calculated MDB in the fact Table?

See you soon,.
KK

Tags: Business Intelligence

Similar Questions

  • Field validation tab still enter data using regExp?

    Hello

    I use jdev 11.1.2.3

    I have a requirement on the field validation tab...

    I have a form that is not duplicate value accept value already existed DB table means so when back of the same value and tab on this high area error message (the code is already exist)

    How to achieve this can someone help me with the code...

    Thank you.

    The solution is given in my other post. Implement a valueChangeListener in your beans. In the listener method call an application module method that checks the new value that you get from the event. If the new value is already in the DB add a message of faces in the listener for changes in value and set the new value to the old value to avoid the false value is found in the user interface.

    Timo

  • Issue while loading data using the file Rules Essbase

    Hi all

    I am facing problem while loading data using the Rules file. In the rules file, I rejected several members in two areas (two dimensions). Now if I load the data using the rules file I'm getting errors for all members in the dataload.err file. If I reject mutiple members of a single field, the data load without settling errors in the dataload.err file.

    I want to know how rmany members of several fields of ejection for loading data using the file Rules Essbase? Is it possible?

    Okay, okay... I think that you must assign Global Select / reject Boolean in the parameters of loading data as 'Or':

  • Calculation of a later date

    Hello

    I would get a field to automatically generate a date based on a date of entry by the user who has then a value added to it on another ground.

    For example, the user would enter the purchase date in a field, and then enter the duration of their terms of payment chosen in a separate field - for example 100 days.

    I would like a third field to automatically get the date entered and the payment period is entered so in this case return the date which is 100 days of their date of entry.

    Any help would be appreciated.

    Thank you

    OK, then you can use this code as the custom of 'End Date ': calculation script

    var originalDateString = this.getField("Date purchase made").valueAsString;
    var daysString = this.getField("Days").valueAsString;
    if (originalDateString=="" || daysString=="") event.value = "";
    else {
        var d = util.scand("dd/mm/yyyy", originalDateString);
        var days = Number(daysString);
        d.setDate(d.getDate()+days);
        event.value = util.printd("dd/mm/yyyy", d);
    }
    
  • Defining the field level line in the table using jQuery

    Hello

    I am using the following command for reading and then set the values in the same row in a report.
    Re: Referring to a value of field line in an interactive report using jquery

    Consider the following excerpt
    // read information eg
    var row = $x_UpTill(this.triggeringElement, 'TR');
    var dateCompleted = $('input[name="f03"]', row)[0];
    console.log(dateCompleted.value);
    // write information eg
    var dateBooked = $('input[name="f02"]', row)[0];
    //dateBooked.value = 'xyz'; // sets to xyz, as expected
    dateBooked.value = return_date; // sets the actual code, not returning string
    Everything works as I expect except the last line. I have a js function returns a formatted string (Date set with Javascript , but in this case, my field now contains the definition of the actual code, not the date string the function actually returns.

    I don't think that I'm just not understand a simple concept for JavaScript here?

    A simple solution might be to create the P0_SYSDATE, calculated field to TO_CHAR(SYSDATE,:F_DATE_FORMAT), then apply
    dateBooked.value = $v('P0_SYSDATE');
    but I'm trying to improve my understanding of javascript/jQuery...

    See you soon,.

    Scott

    So are you saying that return_date is a function real javascript, which returns the document to the format string/date you want?
    If so, then I think you simply need parenthesis to function:

    dateBooked.value = return_date();
    

    Or... I'm missing something here?

    Thank you
    -Jorge

  • Customized for Acrobat field calculation script

    Hi, I have a field calculation script. I want to calculate exp (x), I want to link a X 'A' value. May I know what is the formula for this calculation?

    From another angle, I found at online, the operation is < 2.71 * X >, means 2.71 X power. But duno why <>* may not work to this end (power) to the custom calculation script.

    Do I know what other script can be created for exp (x).

    Please notify. Thank you.

    Of

    McCarthy

    Thank you all! I finally have the answer by myself already.

    Use this formula:

    Event.Value = Math.exp (this.getField("A").value)

    Yes!

  • Hello Sir: I use a generator of form of oracle 10g and I want to search on two dates using between.how it is possible.

    Hello Sir: I use a generator of form of oracle 10g and I want to search on two dates using between.how it is possible.

    I guess its text fields are the date data type.

  • A question about the conservation of fields (hour, min, sec) time DATE type in the table on the changes of NLS_DATE_FORMAT

    Hello

    Oracle version: 12.1.0.1.0 - 64 bit

                      OS:   Fedora Core 17 X86_64

    My question is about the conservation of fields (hour, minute, second) time DATE type in the array on NLS_DATE_FORMAT changes.

    Take the following test case:

    SQL> create table tmptab(dateval date);
    
    Table created.
    
    SQL> alter session set nls_date_format = 'yyyy-mm-dd hh24:mi:ss';
    
    Session altered.
    
    SQL> insert into tmptab(dateval) values('2014-01-01 00:00:00');
    
    1 row created.
    
    SQL> insert into tmptab(dateval) values('2014-01-01 10:00:00');
    
    1 row created.
    
    SQL> commit;
    
    Commit complete.
    
    SQL> select * from tmptab;
    
    DATEVAL
    -------------------
    2014-01-01 00:00:00
    2014-01-01 10:00:00
    
    SQL> alter session set nls_date_format = 'yyyy';
    
    Session altered.
    
    SQL> select * from tmptab where dateval > '2014';
    
    no rows selected
    
    SQL>
    

    I don't understand why it returns nothing. The second test case above insert statement inserted a line with 10 as the value for the time of the DATE field column dateval.

    Accordingly, while comparing this with the literal '2014' (which based on the new value of NLS_DATE_FORMAT = "yyyy" is implicitly converted to DATE), shouldn't the above query returns the line 2014-01-01 10:00 ?

    I mean, I changed the NLS_DATE_FORMAT but data from time in the table fields are preserved and that's why they should normally be taken into account in the comparison of date.

    What I'm trying to say is that for me (Please correct me if I'm wrong), no matter what NLS_DATE_FORMAT configuration is the following test

    SQL> select * from tmptab where dateval > '2014';
    

    is the same thing that

    SQL> select * from tmptab where dateval > to_date('2014-01-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss');
    

    And because the line 2014-01-01 10: 00:00 in the tmptab table. The following test

    2014-01-01 10:00:00 > to_date('2014-01-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss')
    

    evolves normally true (beucase of TIME = 10 on the left side of the test) and therefore this line must be returned which is not the case in the test above.

    You kindly could you tell me what I misunderstood?

    Thanks in advance,

    This is the price for the use of implicit conversions. Implicit DATE conversion rules are not as direct as it can be assumed. In your case, all you provide is year as date format. In this case date implicit conversion rules assumes that month in the current month, day 1 and time as 00:00:00.

    SQL > alter session set nls_date_format = "yyyy";

    Modified session.

    SQL > select to_char (to_date ('2014 "), ' mm/dd/yyyy hh24:mi:ss') twice;

    TO_CHAR (TO_DATE('20)
    -------------------
    01/08/2014-00:00:00

    SQL >

    So, when you start:

    Select * from tmptab where dateval > '2014 '.

    Oracle implicitly converts date using "YYYY", which translates as August 1, 2014 '2014'. That's why your quesry returns no rows.

    SY.

  • Select the year max and max date for a code

    Hello

    I need to extract max year and month max for one code particulare.

    My table contains:

    YEAR MONTH CODE

    ====   =====    ====

    2014 6 X

    2014 7 X

    2013 5 Y

    2013 6 Y


    I need to extract:


    2014 7 X

    2013 6 Y


    I don't like max(YEAR|| le mois), I want the column separated.


    Thank you

    Try this:

    WITH test_data AS (
      SELECT 2014 AS yr, 6 AS mth, 'X' AS code FROM DUAL
      UNION ALL
      SELECT 2014 AS yr, 7 AS mth, 'X' AS code FROM DUAL
      UNION ALL
      SELECT 2013 AS yr, 5 AS mth, 'Y' AS code FROM DUAL
      UNION ALL
      SELECT 2013 AS yr, 6 AS mth, 'Y' AS code FROM DUAL
    )
    SELECT yr
         , MAX(mth) KEEP (DENSE_RANK FIRST ORDER BY 100*yr+mth DESC) AS mth
         , MAX(code) KEEP (DENSE_RANK FIRST ORDER BY 100*yr+mth DESC) AS code
    FROM   test_data
    GROUP BY yr
    ORDER BY 1;
    

    Obviously by storing your dates as the DATE, then ranked by who would be more elegant!

  • Select Max (Date) in two different tables...

    Dear all,

    I need the date of last update of two different tables, I mean max (date). We will update one table at a time. Updated once I need to take the last update.

    It can be either in table A table B.

    for example.

    Table A

    Date of the ID

    100 16/05/2014

    101 20/05/2014

    102, 22/05/2014

    Table B

    Date of the ID

    100 04/06/2014

    101, 26/05/2014

    102 21/05/2014

    I need the date of table B (101 26/05/2014) last updated date...

    Hello

    Another way, using much more GRAND:

    SELECT LARGER (max1, max2) x

    FROM (SELECT MAX (mydate) max1

    OF mytable_a

    )

    (SELECT MAX (myotherdate) max2

    OF mytable_b

    )

    ;

    Best regards

    Bruno Vroman.

  • Extract PDF form data using JavaScript and write in the CSV file

    I received a PDF file with a form.  The form is * not * formatted as a table.  My requirement is to extract form field values and write into a CSV file that can be imported into Excel.  I tried using the menu item "Merge data from spreadsheet files" automated in Acrobat Pro, but the release includes both the labels and values.  I'm mostly just interested in the form field values.

    I would use JavaScript to extract the data from the form and learn JavaScript write CSV file (since I know what should look like the spreadsheet of end).  I got regarding the extraction of the fields in the form:

    this.getField("Today_s_Date").value;

    And the rest of this post: http://StackOverflow.com/questions/17422514/how-to-write-a-text-file-in-Acrobat-JavaScript , I tried to write to CSV using:

    var cMyC = "abc";

    var doc = this.createDataObject ({cName: "test.txt", cValue: cMyC});

    but I get the following error:

    "SyntaxError: syntax error".

    1:Console:Exec ".

    Ideally, I don't want to use a third-party tool online to make, because the data are sensitive.  But please let me know if you have any suggestions.  The ideal output is a CSV file that an end business user can open in Excel to see the format of spreadsheet of his choice.

    Did anyone done this before?  Open to hearing alternatives as well.  Thanks in advance!

    The code you have posted works fine for me in the JavaScript console, so I suspect the problem is something else. Where did he put the code and y at - he seized another code?

    In addition, if CSV is not a strong requirement, I would say that you use delimited by tabs instead. Fields normally cannot contain tab characters, this is a good qualifier to use. It will be also more reliable when you import in Excel. If you need to process the field data that may contain quotes, you need prepare correctly the string data and can use a JavaScript library like this: https://github.com/uselesscode/ucsv

  • Failed to load data using the contour load utility

    I am unable to load data using contour utility charge.
    Assigned data loading dimension such as: account
    Driver-Dimension such as: period
    Member as a pilot: Jan

    Connection file:

    Account, Jan, Point of view, the name of Cube data loading
    Investment, 1234, "India, current, heck, FY13", Plan1


    Utility of contour control
    OutlineLoad A:pract U:admin /I:C:\test1.csv /D:Account /L:C:\lg.log /X:C:\ex.exc


    Exception file

    [Thu Mar 28 18:05:39 GMT + 05:30 2013] Error loading of data record 1: investments, 1234, '' ' India, common, project, FY14' ' ', Plan1
    [Thu Mar 28 18:05:39 GMT + 05:30 2013] com.hyperion.planning.InvalidMemberException: Member India, common, rough, FY14 does not exist or you do not have access to it.
    [Thu Mar 28 18:05:40 GMT + 05:30 2013] Planning of vector data store processes loaded with exceptions: exceptions have occurred, examine the file exception for more information. 1 data record has been read 1 record of data have been processed, 0 were loaded successfully, 1 was rejected.


    Log file:


    Connected application "Rlap", liberation 11.113, adapter Interface Version 5, supported and not enabled workforce, CapEx no taken care and not active, CSS Version 3
    [Thu Mar 28 18:05:38 GMT + 05:30 2013] Input file located and opened successfully "C:\load.csv".
    [Thu Mar 28 18:05:38 GMT + 05:30 2013] Record header fields: account, Jan, Point of view, the name of Cube data loading
    [Thu Mar 28 18:05:38 GMT + 05:30 2013] Located by using 'Account' dimension and for the loading of data into the application 'Rlap.
    [Thu Mar 28 18:05:40 GMT + 05:30 2013] Loading dimension 'Account' has been successfully opened.
    [Thu Mar 28 18:05:40 GMT + 05:30 2013] A refresh of the cube operation will not be run.
    [Thu Mar 28 18:05:40 GMT + 05:30 2013] Create filters for safe operation will not be performed.
    [Thu Mar 28 18:05:40 GMT + 05:30 2013] Look at the files of newspapers of Essbase to status if Essbase data have been loaded.
    [Thu Mar 28 18:05:40 GMT + 05:30 2013] Planning of vector data store processes loaded with exceptions: exceptions have occurred, examine the file exception for more information. 1 data record has been read 1 record of data have been processed, 0 were loaded successfully, 1 was rejected.



    Infact members exist in outline.
    Any help would be appreciated.

    can you double check your csv file, open it in a text editor, because the error is showing additional citations.

    [Thu Mar 28 18:05:39 GMT + 05:30 2013] Error loading of data record 1: investments, 1234, '' ' India, common, project, FY14' ' ', Plan1

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Check if the number in a text field will evaluate to a date format

    I have a field FieldA, which contains 6 numbers, (even if the field is a text field). I need to know if that evaluate the numbers from the field to a real date in MMDDYY format. For example, if FieldA contains 060110, which would evaluate then to a real date from 01/06/10. However, if FieldA contains 130110, so this isn't a valid date and the test will indicate accordingly. I was thinking about using a case statement, but unsure of how to test if the numbers are evaluated to a valid date...

    Sort of:

    BOX WHEN FieldA = 'Date valid' THEN FieldA TO_DATE(FieldA, 'mm-dd-yyyy')

    Any help is appreciated...

    Thank you...
    /* Formatted on 11/14/2011 4:03:53 PM (QP5 v5.149.1003.31008) */
    CREATE OR REPLACE FUNCTION validate_date (in_dt VARCHAR2)
       RETURN VARCHAR2
    IS
    BEGIN
       FOR c IN (SELECT TO_DATE (in_dt, 'mmddrr') x FROM DUAL)
       LOOP
          RETURN 'Valid Date';
       END LOOP;
    EXCEPTION
       WHEN OTHERS
       THEN
          RETURN SQLERRM;
    END;
    
    --------------------------------------------------------------------
    
    WITH t AS (SELECT '060110' fieldA FROM DUAL
               UNION ALL
               SELECT '130110' FROM DUAL)
    SELECT CASE validate_date (fieldA)
              WHEN 'Valid Date' THEN TO_DATE (fieldA, 'mmddrr')
           END
              col1,
           validate_date (fieldA)
      FROM t;
    
    COL1     VALIDATE_DATE(FIELDA)
    6/1/2010     Valid Date
         ORA-01843: not a valid month
    

    Published by: pollywog on November 14, 2011 16:03

  • In formcalc calculation based on the date

    Hello

    I'm a newbie to Adobe Livecycle but of learning.  I create a voucher for fees for employees to be reimbursed for mileage however I would like to create an if statement if the date of the expense is equal or prior to June 30, 2012, then multiply the number of miles driven by a rate of $0,555 per mile and if the rate of charges is equal to or after 1 July 2012 and then multiply the number of miles by a rate of $0.600 per mile.  I have created specific fields labeled dteexpenseDate (field of the date of the entry by the user), decnumberMiles (number of miles engine) and decmileageRate (mileage rate).

    Currently I have this code;

    currentDate var = Date2Num (dteexpenseDate.rawValue = "" 2012-06-30)

    var Datedepense = Date2Num (dteexpenseDate.rawValue, "YYYY-MM-DD")

    var TestNotedefrais = Datedepense - currentDate

    if(expenseTest<0) then

    Sum(decnumberMiles*0.555)

    on the other

    Sum(decnumberMiles*0.600)

    endif

    I'm using formcalc currently but would be open to the use of javascript. I am aware that this is not correct, as I make mistakes, but I've not found anything on the internet to help me.  Any help would be greatly appreciated.

    Thank you

    Lindsay

    I guess you want to fill the last of the 3 fields (mileage rate)? If so, use the calculate event in formCalc with something like

    var changeDate = Date2Num( "2012-07-01", "YYYY-MM-DD" )
    var expenseDate = Date2Num( dteexpenseDate.rawValue, "YYYY-MM-DD" )
    var expenseTest = expenseDate - changeDate
    
    if ( expenseTest < 0 ) then
        $ = decnumberMiles * 0.555
    else
        $ = decnumberMiles * 0.600
    endif
    

    FormCalc has its benefits (faster, better date handling, etc.) but it is not as flexible as javascript as well as the fact that there are not as many places on the web that can give you some examples.

  • I bought a new iPhone SE. My iCloud account still shows my old iPhone data use. How can I erase it from my ICloud account?

    I bought a new iPhone SE. My iCloud account still shows my old iPhone data use. How can I erase it from my ICloud account?

    Do you mean that you see your old data use on the new iPhone?

    Go to settings > cellular > [scroll down to] Reset Statistics

    Otherwise, where exactly do you see this use?

Maybe you are looking for