Addition of days to date column in OBIEE

Hi Gurus,
I have one date column, Alert date and based on this column I need to create another date column say, Due date.The formula will be like,
Due date = Alert date + 30days. I found a function,TimeStampAdd while editing the column formula but not sure as how to use it. Pls help me to implement this.
Thanks in advance.

Timestampadd(sql_tsi_day,30,alertdate)
TIMESTAMPADD(interval, intExpr, timestamp)
e.g:timestampadd (SQL_TSI_DAY, 3, TIMESTAMP'2000-02-27 14:30:00')

Similar Messages

  • How to Split the Date Column in OBIEE

    Hi,
    We have date column name :To_Date and format is MM/DD/YY HH:MM:SS .
    How do split the date into YEARS,MONTH,DAY as new columns.
    kindly help on this.
    Regards.,
    CHR
    Edited by: 867932 on Nov 23, 2011 10:18 PM

    Hi User,
    All 3 functions can be written in rpd too.In BMM layer, duplicate the date column ->Goto Column Mapping tab-> Expression builder ->Select Functions-> Calendar Date/Time Functions-> Select DayofMOnth function. Your logical column's formula will look like,
    DayofMonth(YourDateColumn)
    Rgds,
    Dpka

  • Date column in OBIEE-SQL Server

    Hi expert,
    I have created date (datetime)column in sql server cube. Now I wat it inmy OBIEE as date. how to do that.
    When we import,there are only three option->Double,Varchar,Unknown.

    Something wrong.... once you import table in rpd the column should have Type as DATETIME or DATE.
    If its not the case then you can change the format in rpd.
    If helps pls mark

  • Looping through date column - Summing hours per day

    All,
    Running the query below against my timesheet tables I get the following results:
    -----SQL CODE------
    SELECT
    ts.ts_date Date,
    ts.user_name Name,
    tc.account Account,
    ts.no_of_hrs Hours,
    SUM(ts.no_of_hrs) OVER(PARTITION BY ts.ts_date) Daily_Total
    FROM
    eba_time_timesheet ts,
    eba_time_timecodes tc
    WHERE
    ts.timecode_id = tc.id AND
    ts.user_name LIKE 'JohnD'
    ORDER BY
    1
    -----RESULTS-------
    Date          Name          Account     Hours     Daily Total
    1-Dec-09     JOHND          489310          1.5     8
    1-Dec-09     JOHND          486830          1.5     8
    1-Dec-09     JOHND          481710          3     8
    1-Dec-09     JOHND          481210          0.5     8
    1-Dec-09     JOHND          486840          0.5     8
    1-Dec-09     JOHND          485710          0.5     8
    1-Dec-09     JOHND          481010          0.5     8
    2-Dec-09     JOHND          481710          1     8
    2-Dec-09     JOHND          485710          7     8
    3-Dec-09     JOHND          481710          6     8
    3-Dec-09     JOHND          488810          1.5     8
    3-Dec-09     JOHND          481310          0.5     8
    4-Dec-09     JOHND          489710          8     8
    7-Dec-09     JOHND          481110          0.5     8
    7-Dec-09     JOHND          489710          7     8
    7-Dec-09     JOHND          481210          0.5     8
    However, I would prefer the Daily Total column be a row in the results instead of a column. Here is an example of how I would prefer the results. This statement will then be sent to a calendar for each user to see there time for each account and total time per day.
    Date          Name          Account     Hours
    1-Dec-09     JOHND          489310          1.5     
    1-Dec-09     JOHND          486830          1.5     
    1-Dec-09     JOHND          481710          3     
    1-Dec-09     JOHND          481210          0.5     
    1-Dec-09     JOHND          486840          0.5     
    1-Dec-09     JOHND          485710          0.5     
    1-Dec-09     JOHND          481010          0.5     
    *1-Dec-09     JOHND          Daily Total     8*
    2-Dec-09     JOHND          481710          1     
    2-Dec-09     JOHND          485710          7
    *2-Dec-09     JOHND          Daily Total     8*
    3-Dec-09     JOHND          481710          6     
    3-Dec-09     JOHND          488810          1.5     
    3-Dec-09     JOHND          481310          0.5
    *3-Dec-09     JOHND          Daily Total     8*
    4-Dec-09     JOHND          489710          8
    *4-Dec-09     JOHND          Daily Total     8*
    7-Dec-09     JOHND          481110          0.5     
    7-Dec-09     JOHND          489710          7     
    7-Dec-09     JOHND          481210          0.5
    *7-Dec-09     JOHND          Daily Total     8*
    Any help would be greatly appreciated.
    This is my 1st post so if I've left something out or you need additional info please let me know.
    I’m using Oracle 10g

    user9160575 wrote:
    Thanks for all the input! I ended up using the GROUP BY ROLLUP and adding a CASE statement for inserting "DAILY TOTAL" in the account column.If you are on at least 10g, model solution could be simpler:
    with t as (
               select to_date('1-Dec-09','dd-mon-yy') dt,'JOHND' name,489310 account,1.5 hours,8 daily_total from dual union all
               select to_date('1-Dec-09','dd-mon-yy'),'JOHND',486830,1.5,8 from dual union all
               select to_date('1-Dec-09','dd-mon-yy'),'JOHND',481710,3,8 from dual union all
               select to_date('1-Dec-09','dd-mon-yy'),'JOHND',481210,0.5,8 from dual union all
               select to_date('1-Dec-09','dd-mon-yy'),'JOHND',486840,0.5,8 from dual union all
               select to_date('1-Dec-09','dd-mon-yy'),'JOHND',485710,0.5,8 from dual union all
               select to_date('1-Dec-09','dd-mon-yy'),'JOHND',481010,0.5,8 from dual union all
               select to_date('2-Dec-09','dd-mon-yy'),'JOHND',481710,1,8 from dual union all
               select to_date('2-Dec-09','dd-mon-yy'),'JOHND',485710,7,8 from dual union all
               select to_date('3-Dec-09','dd-mon-yy'),'JOHND',481710,6,8 from dual union all
               select to_date('3-Dec-09','dd-mon-yy'),'JOHND',488810,1.5,8 from dual union all
               select to_date('3-Dec-09','dd-mon-yy'),'JOHND',481310,0.5,8 from dual union all
               select to_date('4-Dec-09','dd-mon-yy'),'JOHND',489710,8,8 from dual union all
               select to_date('7-Dec-09','dd-mon-yy'),'JOHND',481110,0.5,8 from dual union all
               select to_date('7-Dec-09','dd-mon-yy'),'JOHND',489710,7,8 from dual union all
               select to_date('7-Dec-09','dd-mon-yy'),'JOHND',481210,0.5,8 from dual
    select  dt "Date",
            name "Name",
            account "Account",
            hours "Hours"
      from  t
      model
        dimension by(dt,name,to_char(account) account)
        measures(hours,daily_total,0 seq)
        rules upsert all(
                         hours[any,any,'Daily Total'] = max(daily_total)[cv(dt),cv(name),any],
                         seq[any,any,'Daily Total'] = 1
      order by dt,
               name,
               seq,
               account
    Date      Name  Account                                       Hours
    01-DEC-09 JOHND 481010                                           .5
    01-DEC-09 JOHND 481210                                           .5
    01-DEC-09 JOHND 481710                                            3
    01-DEC-09 JOHND 485710                                           .5
    01-DEC-09 JOHND 486830                                          1.5
    01-DEC-09 JOHND 486840                                           .5
    01-DEC-09 JOHND 489310                                          1.5
    01-DEC-09 JOHND Daily Total                                       8
    02-DEC-09 JOHND 481710                                            1
    02-DEC-09 JOHND 485710                                            7
    02-DEC-09 JOHND Daily Total                                       8
    Date      Name  Account                                       Hours
    03-DEC-09 JOHND 481310                                           .5
    03-DEC-09 JOHND 481710                                            6
    03-DEC-09 JOHND 488810                                          1.5
    03-DEC-09 JOHND Daily Total                                       8
    04-DEC-09 JOHND 489710                                            8
    04-DEC-09 JOHND Daily Total                                       8
    07-DEC-09 JOHND 481110                                           .5
    07-DEC-09 JOHND 481210                                           .5
    07-DEC-09 JOHND 489710                                            7
    07-DEC-09 JOHND Daily Total                                       8
    21 rows selected.
    SQL> SY.

  • Not able to save date column with custom date format. in OBIEE 11g

    Hi,
    I have migrated one report from OBIEE 10g to 11g. There is a date column with customized date format(i.e. Default format is 'dd-MMM-yyyy' and I have used 'MMM-yyyy').
    But when I use this custom format and try to save the report in 11g its giving this below error.
    ''Catalog object privilege validation failed for user to path /shared/ALM BI/Finacial Results/History Income Statement Detail.
    You do not currently have sufficient privileges to save a report or dashboard page that contains HTML markup.
    This HTML might be present in column headings, table headings, text views, narrative views, the print header,
    or the print footer and must be removed before saving.''
    Please let me know what changes I need to do for this.
    Regards,
    Ambika Nanda.

    Hi ,
    privilage issues...check the security settings once..
    Thanks,
    Ananth

  • Not able to import date column as Date time(SQL server) in OBIEE

    Hi,
    We have created cube in sql server.
    We have two date column in cube i.e. created date(datetime) joining date(datetime)
    Once I import joining date (Data type: Datetime) and created date(Datetime) by default it import as varchar.
    problems:
    1. I need to calculate difference of two date at OBIEE level. But it is varchar and I am not able to calculate the difference of two dates i.e. created date-joining date.
    I tried evaluate function also but not able to do in OBIEE 10.1.3.4.
    Any help pls

    Hi,
    In your cube have you set the type to 'Date' for this attribute? If not, try it and let me know if this still imports as varchar.
    Hope this helps.
    Thank you,
    Dhar

  • How to place one column under another column in obiee report?

    Hi all,
    I am new to obiee, so need some help from obiee experts. Can anyone tell me how to place one column data under another column in obiee report?
    i need the report to be as below
    category total_students Course_enrollment Test_attended pass_test
    total N % N % N %
    all students ##### ## ## ## ## ## ##
    Ethnicity
    Asian ###### ## ## ## ## ## ##
    African American ###### ## ## ## ## ## ##
    white ######
    Filipino ######
    Gender
    Male ##### ## ## ## ## ## ##
    Female ##### ## ## ## ## ## ##
    and similarly for other columns
    where ethnicity, gender are columns in the table and Course_enrollment, Test_attended, pass_test are calculated columns.
    Please help me to create a report as above if anyone knows how to do it.
    Edited by: Shailaja on Jul 19, 2010 12:23 AM

    Two ideas I can think of:
    1) Create multiple pivot tables and then display them one under the other
    2) Create multiple measure columns such as "male_amt", "female_amt", "white_amt", "asian_amt", "black_amt", etc. for all the columns you need. Then you could simple stack them in a single pivot table.
    Option #2 might give you the prettiest results - but also requires a lot more maintenance (for instance, if you reclassify ethnic groups, you'd have to go through the reports to add additional metric columns).
    Hope this helps,
    Scott

  • Date prompt in obiee

    Hi Gurus,
    Prompt Name(date) =13-sep-10
    table name -test1
    requirement is to once i select the date from Date prompt let us say 13-sep-10 so it should select all the data after that date
    so should be query for the same in prompt SQL
    please help
    thanks

    TimestampDiff and TimestampADD( Difference of two dates) in OBIEE
    How to get a difference between two dates (in terms ) of days,weeks,months what every it may be
    The below formula gives you no.of days between day date and current_Date
    Days difference:
    TIMESTAMPDIFF(SQL_TSI_DAY, Time."Day Date",CURRENT_DATE)
    The below formula gives you no.of months day date and current_Date
    Months difference:
    TIMESTAMPDIFF(SQL_TSI_MONTH, Time."Day Date",CURRENT_DATE)
    The below formula adds months to day date column
    Toadd 12 months to a date column:
    TIMESTAMPADD(SQL_TSI_MONTH, 12,Time."Day Date")
    similarly we can write the formulas using different intervals based on the date format in the column
    Here are the intervals :
    SQL_TSI_SECOND,
    SQL_TSI_MINUTE,
    SQL_TSI_HOUR,
    SQL_TSI_DAY,
    SQL_TSI_WEEK,
    SQL_TSI_MONTH,
    SQL_TSI_QUARTER,
    SQL_TSI_YEAR.

  • 2 date columns and one dimension hierarchy

    Hi,
    I have one question in OBIEE 10g.
    I have one dimension table with 2 date columns (insertedOn, updatedOn)
    I created insertedOnYear, insertedOnMonth and updatedOnYear, updatedOnMonth columns from my date columns.
    I have hierarchy
    Year -> Month -> Day for that dimension table
    and I would like to dril down both columns insertedOnYear and updatedOnYear
    insertedOnYear -> insertedOnMonth -> insertedOn
    updatedOnYear-> updatedOnMonth -> updatedOn
    I am able to do it only for one of these columns and not for both.
    I can place both columns to appropriate levels, but drilling doesn´t work as I want
    Can you tell me how to solve my problem?

    Oops, I was talking about 11G. Ok no problem. Do this. In the physical layer, cretea 2 alias tables. Both pointing to the table where you have these 2 fields. The put everything in your BMM. There create the 2 hierarchies using the 2 different tables (that will point to the 2 alias tables create in the physical layer). This will make them unique.

  • Two date column in a table

    I have a Sales Data warehouse of Retail shops which operate 24x 7 with 2 shifts of 12 hours each. Time for each shift is 7 to 7.
    I have a Calendar Dimension which has all the dates listed.
    TABLE_CALENDAR
    -DAY_KEY NUMBER
    -DAY_DATE NUMBER
    I have a Sales table which has two dates columns: one is the Sales Date whereas another one is the shift date. So there are two joins (Foreign keys) from Sales Table to the Calendar Table.
    TABLE_SALES
    -SALES_KEY
    -SALES_DAY_KEY
    -SALES_TIME_KEY
    -PRODUCT_KEY
    -SHIFT_KEY
    -SHIFT_SUPERVISOR_KEY
    -SHIFT_CASHIER_KEY
    -SHIFT_DAY_KEY
    -SALES_QTY
    -SALES_AMOUNT
    -COST_AMOUNT
    I need to develop an analysis on these tables where the Area managers look at the sales by day, month and year and Shift Supervisor and Shift Managers want to look at sales by shifts. (Shift Date).
    When I define two joins in OBIEE Administrator, it say that I can have a single join from one dimension. (From Calendar Dimenstion to Sales). this way I can report only by Sales Date.
    How can I report by Shift Date?

    Create 2 date dimensions: one for calendar date, one for shift date.
    Paul

  • How to get Week,Month and Year details from a date column

    Hi frenz,
    I've a column like tran_date which is a date column..... I need the next week details based on this column and so on...
    I need month and year details as well based on this tran_date column.... can any one tell me how...
    Thanks in advance

    My example for objects:
    create or replace type date_object as object
      centure number,
      year    number,
      month   number,
      day     number,
      hour    number,
      minute  number,
      second  number,
      daypart number,
      week    number,
      constructor function date_object(p_dt date)
        return SELF as result
    create or replace type body date_object is
      constructor function date_object(p_dt date)
        return SELF as result
      as
      begin
        SELF.centure:= trunc(to_char(p_dt,'YYYY')/100);
        SELF.year:=    to_char(p_dt,'YYYY');
        SELF.month:=   to_char(p_dt,'MM');
        SELF.day:=     to_char(p_dt,'DD');
        SELF.hour:=    to_char(p_dt,'HH24');
        SELF.minute:=  to_char(p_dt,'MI');
        SELF.second:=  to_char(p_dt,'SS');
        SELF.daypart:= p_dt-trunc(p_dt,'DD');
        SELF.week:=    to_char(p_dt,'IW');
        return;
      end;
    end;
    select date_object(sysdate),
           date_object(sysdate).year
    from dual;Regards,
    Sayan M.

  • How to display an "All Day Event" date correctly in an integrated SSRS Report?

    I have two event items in a calendar list in SharePoint 2010. Both items have the same start time and end time. One of them, however, has the "All Day Event" checkbox checked. If I access them through a REST service, this is how the data is
    returned:
    <!-- item 1 -->
    <d:StartTime m:type="Edm.DateTime">2014-03-21T00:00:00</d:StartTime>
    <d:EndTime m:type="Edm.DateTime">2014-03-25T23:55:00</d:EndTime>
    <d:AllDayEvent m:type="Edm.Boolean">false</d:AllDayEvent>
    <!-- item 2 -->
    <d:StartTime m:type="Edm.DateTime">2014-03-21T00:00:00</d:StartTime>
    <d:EndTime m:type="Edm.DateTime">2014-03-25T23:59:00</d:EndTime>
    <d:AllDayEvent m:type="Edm.Boolean">true</d:AllDayEvent>
    I have a report in the same SharePoint 2010 site that uses SSRS in integrated mode. The data source is the calendar list mentioned above.  The date fields are not formatted, just displayed as them come from the list/database.
    My locale is set to en-US. When I run the report, the start date for item 1 is displayed as "3/21/2014" ('all day' set to false) but the start date for item 2 is displayed as "3/20/2014" which is incorrect ('all day' set to true).
    I did some research online and found out that SharePoint stores all date fields as UTC except for 'All Day Events', which are stored in local time (our servers are in Central Time, but I'm running the report fom Pacific Time, in the US).
    I coudn't find a solution to display the date correctly in the integrated SSRS report. Is there a way, maybe some straightforward formatting, to show All Day Event dates correctly? I tried adding hours but this is inconsistent with daylight saving hour changes.
    I would appreciate any help.
    C#, Sharepoint

    Hi SharpBud,
    The date for all day event stored in SQL in GMT time, the start time for an all day event returns the start time in GMT time, which is not the current time most likely.
    This is a confirmed issue, as a workaround, I would suggest you to use a calculate column for the event for the column, using the following format:
    IF(TEXT(([End Time]-[Start Time])-TRUNC(([End Time]-[Start Time]),0),"0.000000000")="0.999305556",IF([Start Time]=ROUND([Start Time],0),[Start Time],DATE(YEAR([Start Time]),MONTH([Start
    Time]),DAY([Start Time])+1)),[Start Time])
    Thanks,
    Qiao Wei
    TechNet Community Support

  • Last Year Inovice Total need to be calculated in a new column in OBIEE 11g

    Hi,
    I have a measure Net Invoiced Amount, and now my client is asking to get a new column in which last year's Net Invoiced Amount total needs to be calculated.
    We need to select the Dates dynamically, it is 2012, so the column should the invoiced amount total for 2011, if it is 2013 then amount should be 2012. Can we do this in RPD. If so, please tell me how.

    Hi,
    Method1:
    TIMESTAMPADD( SQL_TSI_DAY , -1, TIMESTAMPADD( SQL_TSI_DAY , EXTRACT( DAY_OF_YEAR FROM DATE Column) * -(1) + 1,
    DATE Column))
    Note: create alias table from your fact (call it as fact table name_YTD) Join th aliases to the dimension tables exactly like how your normal fact table is joined to the aliases, except for the time dimension.
    Method 2: by using Time series functions (Ago fxn)
    Ago(<<Measure>>, <<Level>>, <<Number of Periods>>)
    Example:Ago("Human Resources"."Fact - Absence"."# Days" , "Human Resources"."Time"."Year" , 1)
    Method 3: if your using obiee11g --> from analysis itself you cand solve it
    AGO(expr, [time_level], offset)
    Thanks
    Deva

  • Date format in obiee reports

    HI guys
    i got two obiee server running in our env . both are identical . on one server when ever we rite any report with date column in it it comes up with dd/mm/yyyy output on another server if we right any report all the date column comes with dd mon yyyy format .. i want both of them should show date like dd mon yyyy format .. i checked all the conf files are both are looking same still not able to figure out where should i change for this to work .
    please let me know if you need more info from my end.
    Regards,
    Dev

    HI Kishore
    Thanks for your reply i checked all the things but with no success. do think there could be any other place where i should check .
    1. nqsconfig date format
    its same for both the two installations
    DATE_TIME_DISPLAY_FORMAT = "yyyy/mm/dd hh:mi:ss" ;
    DATE_DISPLAY_FORMAT = "yyyy/mm/dd" ;
    TIME_DISPLAY_FORMAT = "hh:mi:ss" ;
    2. make sure that you didn't save date format in column properties from front-end
    Just checked and we havan't saved anything in column properties .. even i created new report as well but still format was same ..
    3. Did you mention anything in connection pool settings to set date format.
    no we havan't mention anything in connection pool
    4. Make sure that you are connecting to same database, and date format set for date is same here and there
    yahh both the two installatiosn are connected to same database .. but not sure about "date format set for date is same here and there
    " hw i can check this
    finally, check this: http://108obiee.blogspot.com/2009/04/changing-date-format-mask-in-javascript.html
    no its not on one column .. its to all the date format columns on all the reports .. so i think its not case with me .
    please let me know if you need more info
    Regards,
    Dev

  • Date diff in obiee

    Hi,
    how can i calculate date difference in hours from 2 dates(timestamp) in obiee
    i.e. 02/03/1986:08:00 and 03/02/1986:0:14:00

    Hi,
    If you are having two date column and want the difference in hours then try with the below function:
    timestampdiff(SQL_TSI_HOUR, date_column1, Date_Colum2)
    or if you are having two date value in the expression itself then go with the below syntax:
    timestampdiff(SQL_TSI_HOUR, TIMESTAMP'1998/07/31 23:35:00', TIMESTAMP'2000/04/01 14:24:00')
    Hope it helps,
    Regards,
    Bose
    Edited by: Bose on Mar 20, 2012 3:33 PM
    Edited by: Bose on Mar 20, 2012 3:38 PM

Maybe you are looking for

  • XML Forms Service warnings

    Hi Experts, We have developed some xml templates by using xml form builder. At the time of these templates desing we were on E.P 7.0 SP 10. Recently we have upgraded to SP 13. These xml templates worked fine earlier and working fine now also. But whe

  • Need PDF file for FI-CA

    Hi Friends, Can any one help me, how to get PDF document for FI-CA (Contract Accounts Receivable and Payable (FI-CA) Thanks Chandra

  • CRM 2013: Adding Attachment to Posts

    Hello, I am cresting a new entity will serve the following purpose a) Save the internal conversations (with attachment) b) Save conversation between the  agent and customer (with attachment) Now for "a" - I can use the "Notes". for "b" - I would like

  • Netra T1 AC200 Install of Sol 7

    Solaris 8 installs just fine, but Solaris 7 will not boot from cdrom. Have done everything from "boot cdrom" to changing the boot device "setenv boot-device cdrom disk net" Any suggestions? Thanks Chris

  • Urgent !! System Privileges error

    Hi, I have 4 repository users namely repo_user, rt_owner, rt_access, tgt_user. I have my source and target in other schema namely dev. I created the db link conn (with owner as public, user as dev and schema as dev) in the module configurations for b