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

Similar Messages

  • NqsError:22044 Nesting of Ago or TODATE funct with diff level not supported

    Hello All,
    I am facing an issue while using the timeseries function in OBIEE.
    Firstly, I need to calcuate the To-date function for a measure at Year-Level( Time Dimension) and then I need to calculate the Month Ago function on that column, So the function would look like this
    "Ago(ToDate(Measure, Year) , Month, 1) "
    But it is throwing me an error as shown in the subject line, can you please let me know if there is any workaround for this one.
    Let me know if you need more clarification on this one.
    Regards
    RG

    Hi,
    I have faced the same issue, i have resolved by using below method obiee-date-expressions-reference i have to map your Period (day,month,year etc) able and fact table
    while joining in physical layer you can use it.
    Ex: lets try it below kind for your case
    Last Day of the Previous Month
    TIMESTAMPADD( SQL_TSI_DAY , -(1), TIMESTAMPADD( SQL_TSI_DAY , DAYOFMONTH( CURRENT_DATE) * -(1) + 1, CURRENT_DATE))
    From right to left the first TIMESTAMPADD returns the first day of the Current Month. The second TIMESTAMPADD subtracts a month to arrive at the first day of the previous month.
    Last Day of Previous Year
    TIMESTAMPADD( SQL_TSI_DAY , -1, TIMESTAMPADD( SQL_TSI_DAY , EXTRACT( DAY_OF_YEAR FROM CURRENT_DATE) * -(1) + 1,
    CURRENT_DATE))
    From right to left the first TIMESTAMPADD returns the first day of the current year. The second TIMESTAMPADD subtracts one day to arrive at December 31st of the previous year.
    Refer :
    http://obieeelegant.blogspot.com/2011/06/obiee-date-expressions-reference.html
    hope it's clear.
    Thanks
    Deva

  • 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

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

  • Ago and Todate functions very slow

    I have been playing around with the Ago and Todate functions in BI EE (based on data from the Global schema which I imported into BI EE Administrator) but I find these functions very slow to return the data in an Answers report. Has anyone else found this?

    What's the size of the data set?
    Yes, I'm currently experiencing it. Running on a 600-700k rows tables...
    However, there're 2 things that might help:
    a) we're doing development with cache off - enabling cache - makes report come instantly...
    b) make sure the metrics have correct levels set up - i.e. it's sometimes advantageous to have several duplicates of 1 metric just for this purpose...with different levels....
    Please let me know if you find other ways to improve performance...

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

  • How can I add donate page with different levels of giving such as $250, $150, $50, Other

    How can I add donate page with different levels of giving such as $250, $150, $50, Other.  I am using Foxy Cart…is this possible?

    From Muse end , you can add texts as donation value with paypal button which would take the users to paypal site for payment, with Foxy Cart you can try the suggestion mentioned here :
    https://forum.foxycart.com/discussion/4417/donation-page-radio-button/p1
    Thanks,
    Sanjit

  • Multiprovider - two infoproviders with different levels of summarization

    Hi Gurus,
                  I need to create a report which requires data from two infoproviders, I am thinking of building a multi provider on top of the two infoprovider . I wanted to know if its possible to create a multiprovider on top of two infoprovider with different level of summary. Any suggestions with be very helpful for me.
    Kindly let me know..thanks in advance...
    cheers,
    Tuck

    Hi
    Two different level of summarization will throw inconsistency in reporting
    It is not advisable
    Regards
    N Ganesh

  • Office365 macbook air while copy paste and change font to tahoma forarded message remain with different fonts and size not accepting change

    office365 macbook air while copy paste and change font to tahoma forarded message remain with different fonts and size not accepting change
    mac yosemite
    office365

    Also here's the log before it happened. As you can see there is no activity from 9:48 to 10:00 am when the sound occurred.
    23/02/2014 9:48:12.792 am ntpd[52]: FREQ state ignoring -0.145411 s
    23/02/2014 9:48:15.258 am WindowServer[96]: _CGXHWCaptureWindowList: No capable active display found.
    23/02/2014 9:48:20.000 am kernel[0]: AppleCamIn::systemWakeCall - messageType = 0xE0000280
    23/02/2014 9:48:20.000 am kernel[0]: ARPT: 61.319378: AirPort_Brcm43xx::powerChange: System Sleep
    23/02/2014 9:48:20.000 am kernel[0]: ARPT: 61.319390: wl0: powerChange: *** BONJOUR/MDNS OFFLOADS ARE NOT RUNNING.
    23/02/2014 9:48:20.000 am kernel[0]: AppleCamIn::systemWakeCall - messageType = 0xE0000340
    23/02/2014 10:00:04.000 am bootlog[0]: BOOT_TIME 1393167604 0
    23/02/2014 10:00:06.000 am syslogd[17]: Configuration Notice:
    ASL Module "com.apple.appstore" claims selected messages.
    Those messages may not appear in standard system log files or in the ASL database.
    23/02/2014 10:00:06.000 am syslogd[17]: Configuration Notice:
    ASL Module "com.apple.authd" sharing output destination "/var/log/system.log" with ASL Module "com.apple.asl".
    Output parameters from ASL Module "com.apple.asl" override any specified in ASL Module "com.apple.authd".

  • Error in CodeFirst Seed with migrations : Modifying a column with the 'Identity' pattern is not supported. Column: 'CreatedAt'. Table: 'CodeFirstDatabaseSchema.Category'.

    Hi,
    I have activated migrations on my Azure Mobile Services project. I filled the new seed function Inside the Configuration.cs class of the migrations. If the tables are empty, the seed function is going without any problems. When my AddorUpdate tries to update
    the first object I get the error in the inner exception : "Modifying a column with the 'Identity' pattern is not supported. Column: 'CreatedAt'. Table: 'CodeFirstDatabaseSchema.Category'."
    Part of my code is as follows:
    context.categories.AddOrUpdate(
    new Category { Id="1", Code="GEN", Text="General"},
    new Category { Id="2", Code="POL", Text="Politics"},
    new Category { Id="3", Code="FAS", Text="Fashion"},
    new Category { Id="4", Code="PEO", Text="People"},
    new Category { Id="5", Code="TEC", Text="Technology"},
    new Category { Id="6", Code="SPO", Text="Sport"},
    new Category { Id="7", Code="LIV", Text="Living"}
    Any help is welcomed. Thanks.
    Faical SAID Highwave Creations

    This occurred to me because I changed my POCO models to inherit from EntityData after I had already created my database without the extra Azure Mobile Service properties (UpdatedAt, CreatedAt, Deleted). The only way I fixed it was to drop the database and
    start over with my classes inheriting from EntityData from the beginning. If you can't do that then I would create a new table with EntityData models and see how that database is created and manually update your tables to match those. Here's an image of one
    of my tables from the management console on Azure. You can see that CreatedAt is an index.

  • How to fix "Modifying a column with the 'Identity' pattern is not supported"

    When doing Code First Migrations my mobile service always errors in the seed method with: 'Modifying a column with the 'Identity' pattern is not supported. Column: 'CreatedAt'. Table: 'CodeFirstDatabaseSchema.Methodology' for the CreatedAt column. All my
    models inherit from EntityData. 
    // Sample model
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using Microsoft.WindowsAzure.Mobile.Service;
    namespace sbp_ctService.Models
    public class Methodology : EntityData
    public Methodology()
    this.Scenarioes = new List<Scenario>();
    public string Id { get; set; }
    [Required]
    [StringLength(50)]
    public string EntryMethod { get; set; }
    [Required]
    [StringLength(50)]
    public string TestDirection { get; set; }
    [Required]
    [StringLength(50)]
    public string PassCriteria { get; set; }
    [Required]
    [StringLength(50)]
    public string Dependency { get; set; }
    public bool ExtraInfo { get; set; }
    public virtual ICollection<Scenario> Scenarioes { get; set; }
    And in my Configuration.cs file during an update here's my seed method:
    protected override void Seed(sbp_ctService.Models.sbp_ctContext context)
    // This method will be called after migrating to the latest version.
    context.Methodologies.AddOrUpdate(
    m => m.Id,
    new Methodology { Id = "Methodology1", EntryMethod = "P/F", PassCriteria = "P/F", Dependency = "None", ExtraInfo = false, TestDirection = "Round" },
    new Methodology { Id = "Methodology2", EntryMethod = "P/F", PassCriteria = "Best", Dependency = "None", ExtraInfo = false, TestDirection = "Round" },
    new Methodology { Id = "Methodology3", EntryMethod = "P/F", PassCriteria = "Best", Dependency = "None", ExtraInfo = false, TestDirection = "In/Out" },
    new Methodology { Id = "Methodology4", EntryMethod = "P/F", PassCriteria = "Best", Dependency = "None", ExtraInfo = false, TestDirection = "Out" }
    For some reason on an update the CreatedAt field is created and given a value of null. So of course on an insert/update it will error because CreatedAt is an Identity field.
    I've tried to configure the modelBuilder in my context to tell it that CreatedAt is an identity field, but that still doesn't work.
    modelBuilder.Entity<Methodology>()
    .Property(m => m.CreatedAt)
    .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
    So far the only way to fix this is by commenting out my Seed data, but it's not a fix. I've seen other solutions where you can force it to not serialize certain fields, but I don't know if those solutions apply.

    So I think this occurs because you might have created the database (Code-first) with POCOs that didn't have the CreatedAt field in them. I think that's what I did and the easiest way to fix it for me was to delete my database and re-create it with my POCOs
    inheriting from Entity Data from the very beginning. We were still in development so it worked out for us but I know some people might not be able to do that. Here's what my table looks like after it was created correctly:
    USE [database_name]
    GO
    /****** Object: Table [sbp_ct].[Methodologies] Script Date: 2/24/2015 9:48:45 PM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [schema_name].[Methodologies] (
    [Id] NVARCHAR (128) NOT NULL,
    [EntryMethod] NVARCHAR (50) NOT NULL,
    [TestDirection] NVARCHAR (50) NOT NULL,
    [PassCriteria] NVARCHAR (50) NOT NULL,
    [Dependency] NVARCHAR (50) NOT NULL,
    [ExtraInfo] BIT NOT NULL,
    [Version] ROWVERSION NOT NULL,
    [CreatedAt] DATETIMEOFFSET (7) NULL,
    [UpdatedAt] DATETIMEOFFSET (7) NULL,
    [Deleted] BIT NOT NULL,
    [Name] NVARCHAR (MAX) NULL
    GO
    CREATE CLUSTERED INDEX [IX_CreatedAt]
    ON [schema_name].[Methodologies]([CreatedAt] ASC);
    GO
    ALTER TABLE [schema_name].[Methodologies]
    ADD CONSTRAINT [PK_schema_name.Methodologies] PRIMARY KEY NONCLUSTERED ([Id] ASC);
    Does yours look something like that?

  • In SharePoinr 2013. Unsupported Reporting Services Functionality The feature: "Power View" is not supported in this edition of Reporting Services.

    Hi,
    I am getting the below error which click "Create Power View Report" option in "Power Pivot Gallery"
    Unsupported Reporting Services Functionality
    The feature: "Power View" is not supported in this edition of Reporting Services.
    I have uploaded "Power Pivot" excel file in "Power Pivot Gallery".
    It is frustrating like anything. Can anyone help on it.
    SharePoint 2013. SQL Server 2012. I have enable all the service applications success in CA.
    Thanks in Advance.
    Poomani Sankaran

    Hi,
    Please try to download the SP1 Edition of the rsSharePoint.msi
    file and install it. You have to install the SP1 edition of RS if you are using SP 2013.
    Here is a similar thread for your reference:
    http://social.technet.microsoft.com/Forums/en-US/2d2ecfae-b524-43f3-bf93-0bddfe904b75/the-feature-power-view-is-not-supported-in-this-edition-of-reporting-services?forum=sharepointadmin
    Best Regards
    Dennis Guo
    TechNet Community Support

  • "there was a problem connecting to the server. URLS with the type 'file' are not supported"

    i have a new macbook pro 13" and every 6 minutes or so it pops up a window that says "there was a problem connecting to the server. URLS with the type 'file' are not supported". it never seems to cause any problems but is supremely annoying. how can i make this come to an end?

    I tried someone's solution of taking another external disc and plugging it in, then when it showed up and time machine asked if I wanted to use it or that someone might be trying to trick me, I chose not use it.  Then I  shut down my computer, plugged in the original Lacie, and rebooted the computer and all seems to work fine now-- the Lacie appears on my desktop and all seeems to be in working order. Who knows why or anything else,- as weird as it gets- but for now things seemed fixed--- maybe others can try this too-- it worked for me so far.

  • "There was a problem connecting to the server.   URLs with the type "file:" are not supported.  Why?  What can be done to eliminate it?

    After upgrading to Mountain Lion, I repeatedly get this message:  "There was a problem connecting to the server.   URLs with the type "file:" are not supported. 
    Why? 
    What can be done to eliminate it?

    Open the Time Machine pane in System Preferences. If it shows that Time Machine is ON, click the padlock icon in the lower left corner, if necessary, to unlock it. Scroll to the bottom of the list of backup drives and click Add or Remove Backup Disk. Remove all the disks, then add them back. Quit System Preferences. Test.

  • Message - There was a problem connecting to the server. URLs with the type "file:" are not supported

    new macbook pro receving this message: There was a problem connecting to the server. URLs with the type "file:" are not supported. What is causing this and how do

    Open the Time Machine pane in System Preferences. If it shows that Time Machine is ON, click the padlock icon in the lower left corner, if necessary, to unlock it. Scroll to the bottom of the list of backup drives and click Add or Remove Backup Disk. Remove all the disks, then add them back. Quit System Preferences. Test.

Maybe you are looking for

  • PSE12: unable to edit layers in file created in Photoshop 4.0. [was: Adobe Photoshop 4]

    Changed computers from XP to windows 7. I was using Adobe Photoshop 4.0 from a floppy. I can't load it on my new computer so I bought elements 12. It doesn't allow me to alter the layers I created? Please advise.

  • How can I change the store (from Mexico to US)

    Hi. I moved to the US and have not been able to change the store and be able to use itunes store. I have a remaining balance of 2 pesos in my Mexico account (not enough to buy anything so I can't spend them)...

  • Sun one webserver 7.0 secured website asking userid password

    We have upgraded sun one webserver to 7.0 from 6.0, and installed the latest Verisign SSL certificate. Now the webserver asks authentication of userid/pwd instead of bringing the we page that should give login capability. In the webserver logs we see

  • Download smartform on local machine

    Dear Experts,           I want to download smartforms on local machine from a programme .means if i give smart form name in option it download a smartform on loacl machine. Thanks, jaten

  • Now this is getting silly

    13:51:37, 16 Dec. OUT: BLOCK [65] First packet is Invalid (TCP 192.168.1.65:56213->193.0.160.244:80 on ppp1) 13:51:07, 16 Dec. OUT: BLOCK [9] Packet invalid in connection (TCP 192.168.1.65:56412->178.236.4.85:80 on ppp1) 13:50:07, 16 Dec. OUT: BLOCK