TODATE function

Hi,
when i use todate function in the logical column TODATE(Core."Fact - HR - Payroll".PAY_ITEM_AMT, Core."Date"."Year") getting the following error.
Query Status: Query Failed: [nQSError: 22046] To use TODATE function, the query level ('Year, Fiscal Year') must be a static level.
using OBIEE 10.1.3.4.1 version.
Please can you help me with this.
Edited by: user6747370 on May 12, 2011 1:28 AM

hi,
Sorry yar !
i thought of something else and typed wrongly its my mistake
Refer : Using the Ago Function
Thanks,
Saichand.v

Similar Messages

  • When using TODATE function MDX query is not correctly generated

    Essbase 9.3.1.2 and OBIEE 10.1.3.4.1.
    When using TODATE function MDX query is not correctly generated.
    This leads to unexpected values not only on cumulative columns in report (generated with TODATE), but also other columns (calculated with AGO function or directly read from cube) have incorrect values.
    The problem occurs when you filter on a column that is not in the select list. If you filter on just one level of dimension, results are fine. You can filter on multiple dimensions as long as you filter on just one level of each dimension.
    If you filter on two or more levels of one dimension, than results are not correct. In some cases results for TODATE column are all zeros, in some cases it is a random value returned by Essbase (same random value for all rows of that column), and in some cases BI Server returns an error:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. Essbase Error: Network error [10054]: Cannot Send Data (HY000).
    Here is generated MDX code:
    With
    set [Grupe proizvoda2] as '{[Grupe proizvoda].[N4]}'
    set [Grupe proizvoda4] as 'Generate([Grupe proizvoda2], Descendants([Grupe proizvoda].currentmember, [Grupe proizvoda].Generations(4), leaves))'
    set [Segmentacija2] as '{[Segmentacija].[RETAIL]}'
    set [Segmentacija4] as 'Filter(Generate({[Segmentacija2]}, Descendants([Segmentacija].currentmember, [Segmentacija].Generations(4),SELF), ALL), ([Segmentacija].CurrentMember IS [Segmentacija].[AFFLUENT]))'
    set [Vrijeme3] as '{[Vrijeme].[MJESEC_4_2009]}'
    member [Segmentacija].[SegmentacijaCustomGroup]as 'Sum([Segmentacija4])', SOLVE_ORDER = AGGREGATION_SOLVEORDER
    member [Accounts].[MS1] as '(ParallelPeriod([Vrijeme].[Gen3,Vrijeme],2,[Vrijeme].currentmember), [Accounts].[Trosak kapitala])'
    member [Accounts].[MS2] as '(ParallelPeriod([Vrijeme].[Gen3,Vrijeme],1,[Vrijeme].currentmember), [Accounts].[Trosak kapitala])'
    member [Accounts].[MS3] as 'AGGREGATE({PeriodsToDate([Vrijeme].[Gen2,Vrijeme],[Vrijeme].currentmember)}, [Accounts].[Trosak kapitala])'
    select
    { [Accounts].[Trosak kapitala],
    [Accounts].[MS1],
    [Accounts].[MS2],
    [Accounts].[MS3]
    } on columns,
    NON EMPTY {crossjoin ({[Grupe proizvoda4]},{[Vrijeme3]})} properties ANCESTOR_NAMES, GEN_NUMBER on rows
    from [NISE.NISE]
    where ([Segmentacija].[SegmentacijaCustomGroup])
    If you remove part with TODATE function, the results are fine. If you leave TODATE function, OBIEE returns an error mentioned above. If you manually modify variable SOLVE_ORDER and set value to, for example, 100 instead of AGGREGATION_SOLVEORDER, results are OK.
    In all cases when this variable was modified in generated MDX, and query manually executed on Essabse, results were OK. This variable seems to be the possible problem.

    Hi,
    Version is
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    CORE    10.2.0.5.0      Production
    TNS for 64-bit Windows: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production
    Sorry, in my last post i forgot to mention that i already created a function based index but still it is not using because, there is a UNIQUE constraint on that column.
    Thanks

  • How to use todate function in JDBC adapter

    Hi All,
    How can we use the todate function to update a date field in Oracle database. I am getting a
    java.sql.SQLException: ORA-01858: a non-numeric character was found where a numeric was expected
    Exception, when I am mapping the date fields with  to_date('03/28/2009 18/43/19','MM/DD/YYYY HH24/MI/SS').
    Thanks,
    Yomesh

    The following is standard SAP document regarding this attribute, this attribute used to compose your SQL clause for string or non-string, for string, you need to put the "YES". in your case, you need to set set the value "NO"
    so create an attribute, pass a constant value "NO" to it, that is it.
    hasQuot= YES|NO During construction of the WHERE condition of the SQL statement, the table column type determines whether the default is to set the values in quotation marks (text column types) or not (numerical column types). In a few cases (for example, when using functions), it may be necessary to override this. This attribute enables you to do this. If YES, quotation marks are always set round the values for which this attribute is set in the SQL syntax. If NO, quotation marks are never set. Only use this attribute in individual cases.
    Regards.
    Liang

  • Problem with todate function in OBIEE.

    Hi,
    I have some data mismatch while using todate function. There is a measure GWP, and two logical columns MTD and YTD. MTD is todate(GWP, fiscal_month) and YTD is todate(GWP, fiscal_year). whereas sometimes MTD is displaying data and YTD doesn't. Probably it has to display, what is a problem with this? Can anyone help me out!!!
    Thanks,
    Anitha.B

    Hi,
    Thanks for your response.
    The requirement is, there is a date filter and measure GWP(sum) and when selecting a date it should ensure the following.
    1. Daily - GWP of the selected date
    2. MTD - GWP from first day of the selected month upto the selected date.
    3. YTD - GWP from the first day of the financial year of the date to the selected date.
    So created a time dimensional hierarchy fiscal_year, fiscal_month and date_time,date_key(chronological key).
    created a filter as
    date_time is equal to the date filter
    MTD - todate(gwp,fiscal_month)
    YTD - todate(gwp,fiscal_year)
    There is a discrepency in the result in which sometimes am getting the value for MTD and not for YTD like
    22/11/1986
    Product Daily MTD YTD
    A 0 100 0
    B 0 200 300
    C 0 350 0
    It may not be a problem with the data , then where am I doing mistake? help me.
    Thanks,
    Anitha.B

  • [nQSError: 22036] Level in TODATE function (Quarter) must be a rollup...

    Hi,
    i've following problem. I hope you can help. It's quite urgent.
    I have following TimeDim hierarchy, in my rpd:
    Logical Level: Total Time - Properties: Grand Total Level
    Child Logical Level: Year - Properties: Supports rollup to higher level of aggregation - Keys: Year Code (Cronological Key) - Logical Column: Year Code, Year Description
    Child Logical Level: Semester - Properties: Supports rollup to higher level of aggregation - Keys: Semester Code (Cronological Key) - Logical Column: Semester Code, Semester Description
    Child Logical Level: Quarter - Properties: Supports rollup to higher level of aggregation - Keys: Quarter Code (Cronological Key) - Logical Column: Quarter Code, Quarter Description
    Child Logical Level: Time Detail - Properties: Supports rollup to higher level of aggregation - Keys: TTPER (Cronological Key) - Logical Column: Desc Month, TTPER, Desc Month Short
    Then, i've defined my measures using TODATE Function:
    - Net Number of HA Units delivered Monthly
    - Net Number of HA Units delivered Qtd = TODATE("Net Number of HA Units delivered Monthly", "TimeDim"."Quarter")
    - Net Number of HA Units delivered Ytd = TODATE("Net Number of HA Units delivered Monthly", "TimeDim"."Year")
    - Ha Returned Quantity Monthly
    - Ha Returned Quantity Qtd = TODATE("Ha Returned Quantity Monthly", "TimeDim","Quarter")
    - Ha Returned Quantity Ytd = TODATE("Ha Returned Quantity Monthly", "TimeDim","Year)
    In my Report i've following columns:
    HA Deliveries Quantity Gross QTD: fx = Net Number of Ha Units delivered Qtd + Ha Returned Quantity Qtd
    HA Deliveries Quantity Gross YTD: fx = Net Number of Ha Units delivered Ytd + Ha Returned Quantity Ytd
    Column HA Deliveries Quantity Gross Ytd works. For first column i have following error:
    [nQSError: 22036] Level in TODATE function (Quarter) must be a rollup of (or equivalent to) the measure level (Year).
    Why?
    If i modify first column fx dropping sum, but selecting first or second addend separately it works. Sum not
    For example: HA Deliveries Quantity Gross Qtd: fx = Net Number of HA Units delivered Qtd OK
    or
    HA Deliveries Quantity Gross Qtd: fx = HA Returned Quantity Qtd OK
    Maybe there's something wrong in my hierarchy definition?. Please help
    Giancarlo

    Giancarlo,
    Can you try adding prersentation column "TimeDim"."Quarter" to your report and check ? Hide it if you don't require it. This shud solve your problem as the Time Hierarchy is defined correctly. Also, hope you have set the Chronological Key correctly at the last level.

  • Error While using ToDate Function

    Hi All,
    I am getting below error while creating one report in OBIEE. Please help me in this regard as this is bugging me from long time.
    View Display Error
    Odbc driver returned an error (SQLExecDirectW).
    <<Picture (Metafile)>> Error Details <javascript:void(null)>
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 435222656. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058]
    A general error has occurred. [nQSError: 22047] The Dimension used in TODATE
    function must be referenced in the query. (HY000)
    Kindly help me resolve this issue.
    Thank you,
    Yugendra.

    HI User,
    Refer this link
    http://siebel.ittoolbox.com/groups/technical-functional/siebel-analytics-l/nqserror-22047-the-dimension-used-in-ago-function-must-be-referenced-in-the-query-2692576

  • Nesting of AGO or TODATE functions with differing level arguments is not supported

    I have a column in BMM which calculates the Year-To-Date Sales. This function uses the ToDate function to caculate the YTD.
    I need to develop another formula column which shows the last-year's YTD.
    I develop this formula in BMM by AGO on the YTD column which already uses a ToDate function.
    In BI Answers when selecting this column, results in the below message:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 22044] Nesting of AGO or TODATE functions with differing level arguments is not supported. (HY000)

    To reply to my own question. It appears I got it working, that is, the error message problem is solved, but I still have questions on how to use these functions.
    To get it to work, I added the primary key D_TIJD.TIJDKEY at the level of the lowest grain in my dimension (level tab).
    What I still wonder is how to make it select the right values. I have the following hierarchy: bookyear - bookperiod - week. A bookperiod contains 4 or 5 weeks (4,4,5 in a quarter), so 12 periods in one year. I defined a measure at period level and another at that level with the ago function, that should return the figures for that same period of the year before. My first question is, whether to go back 12 periods or 52 weeks (which is the lowest grain in my dimension)?
    The second question is how to use a combination of TODATE and AGO so that if I calculate the current period (of which only 2 weeks are passed), I also only want to include the same two weeks for that period one year ago in order to make a correct comparison. How do I do that???

  • I had problem with todate function

    hi,
    Todate function is not working properly in my reports.
    when i applying the todate function i get same values not cumulative.
    And also i have one more doubt, whether snowflake schema supported for TODATE Function?
    if you have answer pls give me details

    Do you have a lot of apps? Did you use a lot of apps recently? If so, many of them may still be resident in memory even if you aren't currently using them. Double-tap the home key and you should see the app tray with a list of most recently used programs. Press and hold the icons in the tray and remove the ones you don't use often to remove them from memory. Powering off and then back on might also help.
    My wife's iPod does that sometimes, and it's usually because we run out of memory due to apps remaining in memory even when not used. The suggestion above is how we normally fix the problems.

  • TODATE Function used on a dimension which is logically snowflaked.

    Guys,
    PLease help me to resolve the below error.Can anone explain why do we get this error and how to resolve it?
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 171039483. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 22045] TODATE function is used on a time dimension which is logically snowflaked. (HY000)
    SQL Issued: SELECT "Time"."Fiscal Quarter" saw_0, "Facts - Budget"."Total Operating Expenses" saw_1, "Facts - Actuals"."Total Operating Expenses" saw_2, "Facts - Budget"."Total Operating Expenses"-"Facts - Actuals"."Total Operating Expenses" saw_3, "Facts - Budget"."Total Operating Expenses YTD" saw_4, "Facts - Actuals"."Total Operating Expenses YTD" saw_5, "Facts - Budget"."Total Operating Expenses YTD"-"Facts - Actuals"."Total Operating Expenses YTD" saw_6, AGGREGATE(saw_1 BY ), AGGREGATE(saw_2 BY ), AGGREGATE(saw_3 BY ), AGGREGATE(saw_6 BY ) FROM "Financials - GL Budget and Expenses" WHERE ((Time."Fiscal Quarter" <= VALUEOF(NQ_SESSION."CURRENT_FSCL_QUARTER")) AND (Time."Fiscal Quarter" > VALUEOF(NQ_SESSION."FSCL_QTR_YEAR_AGO"))) AND (("WFS Segments".ORG_NUM = VALUEOF(NQ_SESSION."OU_ORG"))) AND ("GL Segment1"."Hierarchy ID" = 'TTTTT') AND (Time.Status = 'Closed') ORDER BY saw_0
    Thanks in advance...

    AGO and TODATE would only work with 1 physical time table..
    Re: TODATE and AGO function errors in OBIEE
    hope this link may helps you.
    Thanks,
    Chinna

  • On the AGO Function need to Create TODATE function with Diff levels - MTD,Q

    Hi All,
    My Basic Requirement is to Create Time Series Function on AAA ie ( Month To Date , Quarter To Date and Year To Date )
    The Logic for the AAA = XXX / Previous 3 Months Revenue.
    we know that we can use the AGO Function to create Previous 3 months Revenue with Month is Level . But the issue is .... i cant use AGO function since i need to perform Year to Date, QTD and MTD upon 'AAA' this OBIEE doesn't permit to use nested time series functions upon varying levels .
    So How can i Resolve the issue ie creation of TODATE function on the AGO Function with Diff levels
    Thanks,
    Swapna S

    hi,
    for your requirement create three repository variables like
    for previous 3 months create repository variable like
    select to_char(sysdate,'yyyymm') -3 from dual;
    for month to date first calculate first day of the month
    select To_Char(Add_Months(Last_Day(Sysdate),-1) + 1,'MM/DD/YYYY') from dual;
    after put a filter in answers date between first date of the present month and current date
    create the same thing for year to date
    calculate first date in the year like following query
    select To_Char(Trunc(Sysdate,'YEAR'),'MM/DD/YYYY') from dual;
    after that apply filter date b/w first date in the year and current date
    i hope it works for your scenario
    Regards
    Naresh
    Edited by: Naresh Meda on Nov 10, 2008 2:08 AM
    Edited by: Naresh Meda on Nov 10, 2008 2:12 AM

  • AGO and TODATE functions

    I want to use the AGO and TODATE functions to calculate a measure for the selected year and the year before, as well as a year--o date measure, but cannot get it to work. It fails with the following error:
    A general error has occurred. [nQSError: 22040] To use TODATE function, the storage level of the query ('[D_TIJD.TIJDKEY]') must be a static level.
    I have setup a time dimensions in which I can drill up and down and followed exactly the same steps that were layed out in the Oracle training activity guide, but so far without any luck. From Mark Rittman's articles I learned that using these functions is not as straight forward as one might hink. Does anybody have a working example of this?
    Regards,
    Paul

    To reply to my own question. It appears I got it working, that is, the error message problem is solved, but I still have questions on how to use these functions.
    To get it to work, I added the primary key D_TIJD.TIJDKEY at the level of the lowest grain in my dimension (level tab).
    What I still wonder is how to make it select the right values. I have the following hierarchy: bookyear - bookperiod - week. A bookperiod contains 4 or 5 weeks (4,4,5 in a quarter), so 12 periods in one year. I defined a measure at period level and another at that level with the ago function, that should return the figures for that same period of the year before. My first question is, whether to go back 12 periods or 52 weeks (which is the lowest grain in my dimension)?
    The second question is how to use a combination of TODATE and AGO so that if I calculate the current period (of which only 2 weeks are passed), I also only want to include the same two weeks for that period one year ago in order to make a correct comparison. How do I do that???

  • ToDate Function giving ERROR#

    Hi,
    I am trying to convert a string to date , using Todate function in webi 4.0 , but its giving ERROR#
    =ToDate([Final Protocol Avail Ac];"m/d/yyyy")

    I want to get the format like this  1/3/214   , so basically wanna convert
    01-JAN-2014(String)  --> 1/3/14
    also  the below  syntx is converting it into a string , i want it to be date format, as i will be doing DaysBetween that with another date
    =Formatdate(todate([Final Protocol Availa Ac];"dd.MM.yyyy");"MM/dd/yyyy")

  • Nested Ago and Todate function problem

    Hi,
    in my rpd i have following Time hierarchy:
    Year
    Quarter
    Month
    and a fact table Fact Shop which contains Monthly measure "Number of Hearing Aids Delivered".
    I must calculate PY_QTD, PY_YTD versions of above measure.
    I have tried to use built-in Time Functions Ago and ToDate in the following way:
    PY_QTD
    Todate(Ago("Number of Hearing Aids Delivered",1,"Time.Year"), "Time.Quarter")
    PY_YTD
    Todate(Ago("Number of Hearing Aids Delivered",1,"Time.Year"), "Time.Year")
    but when i check consistency i have error which says approximately "You can nest Ago and ToDate functions".
    There's another way, to calculate it? Can you help?
    Thanks
    Giancarlo

    So u r referring PY as previous year ;)
    Here u go;
    it’s a combination of AGO and TODATE.
    You create a value – let’s say Sales MTD by just following normal process…then you create a logical column with the following formula AGO (Sales MTD, Month Dim, 12)
    that should give you a MTD measure you’re looking for. I hope this is useful. Just dont use both function in single logical column....use seperate by first creating YTD n then AGO function to create previous year data.
    For ur case use to calculate PY_YTD use below:
    Create logical column
    Aids Delivered YTD with formula as TODATE("Number of Hearing Aids Delivered"), "Time.Year")
    and then create another logical column as
    Aids Delivered PY_YTD with formula as AGO("Aids Delivered YTD","Time.Year",1)
    This will work for sure....

  • ToDate() function not working

    I need to convert string to Date type and use it in the DaysBetween function. 
    Created a variable =ToDate("01/10/2010"; "dd/mm/yyyy"). 
    The output for this becomes 01/01/2010.
    What can I do to make the ToDate() function work?

    I guess the date format in BO is "dd/MM/yyyy".  mm represents the minutes in web-I.
    Hope this helps you.
    Regards,
    Rohit

  • Todate Function error on creating YTD measure

    I'm trying to create YTD measure using TODATE funtion and and I'm getting the error : To use TODATE function storage level of the query must be static level.
    Please help me to know what I might have done wrong and how to correct it.
    thanks in advance.
    Regards
    Jsmith

    You have incorrectly defined time dimension. Search the forum or check this link:
    http://www.rittmanmead.com/2007/04/30/obi-ee-time-dimensions-and-time-series-calculations/

Maybe you are looking for

  • CS6 Design and Web Premium install failure (OS X)

    Hello all, I recently was given the chance to upgrade to CS6 Design and Web Premium through my educational instutition. I first uninstalled my CS5.5 installation that I previously had through them. Now, whenever I run the CS6 installer, the timer kee

  • Why can't I sign in to icloud?

      I have windows and can't sign in to icloud. What is my problem?

  • Connecting to HP Photosmart A617

    I suddenly realized I was running back and forth to a printer in another room and that it was bluetooth capable, so I attempted to connect it (HP Photosmart A617) to my new Macbook Pro....... but even with the it in visible mode, my mac isn't seeing

  • Internal order - FI postings not allowed

    Hi   I am trying to release a billing document. I am getting an error saying "FI postings not allowed - I.O number". I am not much aware of internal orders. Could anyone here let me know how I can enable FI postings for this particular internal order

  • No dial tone, broadband still works

    I cannot get a dial tone, but my broadband still works.If I disconnect the asdl filter and plug the phone into the main wall unit, I get a tone. I have changed the asdl filter and still cannot get a tone with the homehub connected. Any ideas on how t