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

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

  • 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

  • Purge Data #error when UserResponse and ToDate function is used in same formula

    Hi,
    I have a formula which works well when there is data but when I purge the webi report I get #Error for the cells wherever I have used UserResponse and ToDate function in the same formula.
    Ex: =FormatDate(ToDate(UserResponse("Enter Modified Date:");"M/dd/yyyy hh:mm:ss a");"MM/dd/yyyy")
    I tired in multiple reports. I get the same error in all reports when i purge the data but when i unpurge and show the reports with data, I won't get any error.
    Is this known issue? If anyone knows the solution. Please answer it.
    (FYI, I am using BO4.0 SP5)
    Thanks.

    Thanks a lot for all your efforts in trying to find the solution to my question but the formula that you had has a error, as you were using commas instead of semicolon. If you want I can change it & it's not a big deal.
    By the way, I have found even better solution.
    Substrings will kill the processing time and we should try to avoid string functions as much as possible. So I used IsError function instead.
    =If IsError(FormatDate(ToDate(UserResponse("Enter Modified Date:");"MM/dd/yyyy hh:mm:ss a");"MM/dd/yyyy")) Then "" Else FormatDate(ToDate(UserResponse("Enter Modified Date:");"MM/dd/yyyy hh:mm:ss a");"MM/dd/yyyy")

  • Why can I not use the channel name, which is obtained from the function of DAQmx Task, as the input of the channel name for the function of Get Channel Information of DAQ?

    Why can I not use the channel name, which is obtained from the function of DAQmx Task, as the input of the channel name for the function of Get Channel Information of DAQ?

    Not a lot of details here, but my guess is this isn't working for you because you are wiring in the task to the Active Channels Property and not the actual Channel Name. I have attatched a screenshot of what I believe you are trying to do. The Task has 2 channels in it, so I need to index off one of the channels and wire it into the active channels input of the Channel Property node. Then I can read information about that channel
    Attachments:
    channel_name.JPG ‏69 KB

  • Trying to use 2 different Dimension tables and make a hierarchy on some columns which are split into these dimensions .. how do I do that

    Trying to use 2 different Dimension tables and make a hierarchy on some columns which are split into these dimensions .. how do I do that

    If you need to make a hierarchy in an Attribute view you need to have all relevant fields/columns in the same Dimension table..

  • 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???

  • 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 doesn't work when I select a month

    Hello all,
    I've got a problem. It worked before, but can't get it to work anymore
    I have a fact called XXOBI_GL_LINES_MV which has a column Amount_accounted. Now I want to use the ToDate function which look something like this:
    ToDate(XXOBI_GL_LINES_MV,TIMEDIM.YEAR)
    So I want to create a year to date.
    Now when I make a report it all works fine. Except when I add a column of the time dimension to the report.
    But the strange thing is, it worked, but I can't get it to work anymore so I hope someone can help me out!!
    Best regards,
    Remc0

    I don't know if this adds any value, but this is the query it generates:
    select D1.c1 as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c4 as c4
    from
    (select D2.c4 as c1,
    sum(T12332.AMOUNT_ACCOUNTED * -1) as c2,
    D2.c3 as c3,
    D2.c5 as c4
    from
    XXOBI_GL_LINES_MV T12332 /* Feit - Journaal */ ,
    (select distinct min(D1.c1) over (partition by D1.c4) as c1,
    min(D1.c2) over (partition by D1.c4, D1.c3) as c2,
    D1.c3 as c3
    from
    (select Case when case D1.c5 when 1 then D1.c3 else NULL end is not null then Rank() OVER ( ORDER BY case D1.c5 when 1 then D1.c3 else NULL end ASC NULLS LAST ) end as c1,
    Case when case D1.c6 when 1 then D1.c3 else NULL end is not null then Rank() OVER ( PARTITION BY D1.c4 ORDER BY case D1.c6 when 1 then D1.c3 else NULL end ASC NULLS LAST ) end as c2,
    D1.c3 as c3,
    D1.c4 as c4
    from
    (select T12378.DAY_DATE as c3,
    T12378.YEAR_ID as c4,
    ROW_NUMBER() OVER (PARTITION BY T12378.YEAR_ID ORDER BY T12378.YEAR_ID DESC) as c5,
    ROW_NUMBER() OVER (PARTITION BY T12378.YEAR_ID, T12378.DAY_DATE ORDER BY T12378.YEAR_ID DESC, T12378.DAY_DATE DESC) as c6
    from
    XXOBI_TIME_MV T12378 /* Dim - Tijd */
    ) D1
    ) D1
    ) D3,
    (select distinct min(D1.c1) over (partition by D1.c5) as c1,
    min(D1.c2) over (partition by D1.c5, D1.c6) as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5
    from
    (select Case when case D1.c7 when 1 then D1.c6 else NULL end is not null then Rank() OVER ( ORDER BY case D1.c7 when 1 then D1.c6 else NULL end ASC NULLS LAST ) end as c1,
    Case when case D1.c8 when 1 then D1.c6 else NULL end is not null then Rank() OVER ( PARTITION BY D1.c5 ORDER BY case D1.c8 when 1 then D1.c6 else NULL end ASC NULLS LAST ) end as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5,
    D1.c6 as c6
    from
    (select T12378.MONTH_ID as c3,
    T12378.MONTH_DESCR as c4,
    T12378.YEAR_ID as c5,
    T12378.DAY_DATE as c6,
    ROW_NUMBER() OVER (PARTITION BY T12378.YEAR_ID ORDER BY T12378.YEAR_ID DESC) as c7,
    ROW_NUMBER() OVER (PARTITION BY T12378.YEAR_ID, T12378.DAY_DATE ORDER BY T12378.YEAR_ID DESC, T12378.DAY_DATE DESC) as c8
    from
    XXOBI_TIME_MV T12378 /* Dim - Tijd */
    ) D1
    ) D1
    ) D2
    where ( T12332.EFFECTIVE_DATE = D3.c3 and D2.c1 = D3.c1 and D2.c4 = 'January 2009' and D2.c2 >= D3.c2 )
    group by D2.c3, D2.c4, D2.c5
    ) D1

  • How to use the RateEntity dimension in SAP BPC?

    Hello everbody,
    I am implementing a consolidation process using SAP BPC. I want to use the RateEntity dimension, to translate a same currency into different exchange rates depending on the company.
    I want the company which ID is GFU (which is from Brazil) in LegalEntity dimension is converted using a special exchange rate. I have added a GFU member in RateEntity dimension, and I have entered the exchange rates for the member GFU and for the member Global in RateEntity dimension.
    But the problem is that after I run the FX Restatement package, converted data for this company is not the proper one, because Global exchange rates have been used instead of GFU exchange rates. Does anybody know why? Do I have to do anything else? 
    Thank you very much for your time

    Do you see the search functionality in the upper left of the screen?
    Okay, now type in ecatt, press enter and in the next screen filter on blogs.

  • 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

  • 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 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/

  • Ago/Todate Function

    How to make use of AGO/TODATE function in answer not RPD?
    I do not know how to insert data,such as time_level [AGO(expr, time_level, offset) ]

    Hi,
    AGO(<measure_expression>, <level>, <number of period>)
    Where:
    expr is an expression that references at least one measure column.
    time_level is an optional argument that specifies the type of time period, such as quarter, month, or year.
    offset is an integer literal that represents the time shift amount.
    Refer the below example:
    http://www.rittmanmead.com/2007/04/obi-ee-time-dimensions-and-time-series-calculations/
    http://sandybi.wordpress.com/2009/12/08/time-series-caclulations-in-obiee/
    Thanks
    Deva

Maybe you are looking for