AGO function in OBIEE to display weekly sales data of this year vs last yea

All,
I would to create an analysis that display this year sales numbers vs last year by weekly
I was able to do this at month level by specifying the offset value to 12 to the AGO function in repository.
I am not able to do at week level.
Can someone please help?
Thanks

Check the W_DAY_D or W_WEEK_D for number of weeks per year, validate the year/4 then its leap year then 53
Use this in ago function at <<Number of Periods>>.
I think you have to go for 53 based on these tables some times 54.

Similar Messages

  • Report that  display salary for employee from this year and prvious year

    Hi
    How to do a report that display salary for employee from this year an previous year, my table has from period and two perid?
    Thanks

    You could try something like this but you MUST learn how to post questions! Very few members will help you if you word your question poorly or forget to mention vital imformation!
    select distinct ty.id, ty.emp, ty.sal, ly.sal
    from (select distinct id, userid, sal
    from salary_table
    where id = 123456
    and from_period = '01-JAN-2010'
    and to_period = '31-DEC-2010') LY,
    salary_table TY
    where ty.id = 123456
    and ty.from_period = '01-JAN-2011'
    and ty.to_period = '31-DEC-2011'

  • Function module to derive start and end dates from fiscal year and period.

    Hi,
    I want to know a function module to derive start and end dates from fiscal year and period.
    ie: If I have say fiscal year '2010' and period '07', then the start date of this period would be '01.10.2010'.
    Thanks.
    Moderator Messge: Basic Date questions are not allowed.
    Edited by: kishan P on Oct 18, 2010 4:45 PM

    Hi,
    This is one of my exit that display the calmonth (offset -12). Usefull when I have to retrieve in a KF a complete rolling year depending one calmonth.
    S_VMUCMN is my selection variable
    S_TXTCMN_M12 is my text variable calmonth-12
    S_TXTCMN_M0 is my text variable for selected calmonth.
    WHEN 'S_TXTCMN_M12'.
        IF i_step = '2'.
          LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'S_VMUCMN'.
            CLEAR l_s_range.
            " First day of the selected month
            CONCATENATE loc_var_range-low '01' INTO l_calday.
            CALL FUNCTION 'YFRBW_FUM_CAL_DATE_IN_INTERVAL'
              EXPORTING
                date      = l_calday
                months    = 12
                signum    = '-'
              IMPORTING
                calc_date = l_calday.
            l_s_range-low = l_calday+0(6).
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            APPEND l_s_range TO e_t_range.
            EXIT.
          ENDLOOP.
        ENDIF.
    Thus, in KF header you have to put the two text variable to display the complete period.
    Hope it helps,

  • Nested AGO function in OBIEE

    Hi ,
    I am not able to understand the reason behind using Nested AGO functions.
    In one of the logical columns (Sales LastYear LastWeek) the mapping was in the following fashion:
    Ago(Ago("Core"."Fact - Retail Inventory Receipts"."Receipts Retail" , "Core"."Date Retail Fiscal Calendar"."Fiscal Week" , 1) , "Core"."Date Retail Fiscal Calendar"."Fiscal Week" , 52)
    Is it the same as writing a ago function with period of 53?
    Like this:
    Ago("Core"."Fact - Retail Inventory Receipts"."Receipts Retail" , "Core"."Date Retail Fiscal Calendar"."Fiscal Week" , 53)
    Please help me understand.
    Thanks for your help.
    Anand

    Hi Anand,
    This is how I interpret the function:
    Display the fact 'Receipts Retail' for the current fiscal period minus one fiscal week minus 52 fiscal weeks. So basically: Display the fact for the current fiscal period minus 53 fiscal weeks.
    However, since the column is named 'Sales LastYear LastWeek', this definition is a bit tricky. The formula is only true, if the fiscal year consists of 52 fiscal weeks (most of the time this is correct, but you never know!). I would prefer changing the second part of the forumula to Fiscal Year, 1:
    Ago(Ago("Core"."Fact - Retail Inventory Receipts"."Receipts Retail" , "Core"."Date Retail Fiscal Calendar"."Fiscal Week" , 1) , "Core"."Date Retail Fiscal Calendar"."Fiscal Year" , 1)
    This will substract a fiscal week and a fiscal year.
    I hope this helps.
    Regards,
    Marco Siliakus

  • Problem with AGO function in OBIEE

    Hi I am new to OBIEE,
    I am working on Trend Analysis of ETL Mappings,
    I am using AGO Function to get the Previous day Elapse Time of a mapping but while generating the report its behaving in a strange way.
    like
    AGO("BI Performance"."Map Val Fact"."Elapse Time Minutes","BI Performance".ETLStartDim."Day",1) -- Day Ago Elapse time
    AGO("BI Performance"."Map Val Fact"."Elapse Time Minutes","BI Performance".ETLStartDim."Day",2) -- Two Day Ago Elapse time
    For example, in database there is date like
    Date Elapse Time
    2nd June 10 min
    1st June 11 min
    30th may 10 min
    My date in Report should be like
    Date Elapse Time Day Ago Elapse Time Two Day Ago Elapse Time
    2nd June 10 11 10
    But the date coming over here is
    Date Elapse Time Day Ago Elapse Time Two Day Ago Elapse Time
    2nd June 10
    3rd June 10
    4th June 10
    So if any one could help me out of this, it would of great help.
    With Regards
    Chaitanya

    This is posted to the incorrect forum. Please post to an OBIEE forum.

  • AGO function in OBIEE

    Hi,
    I am creating a new logical column on my fact table and would like to use time series function(AGO) to compare trends a month ago. I have a time dimension too.
    I am using this expression defined in the new logical column properties:
    Ago("HCBF"."Workflow Fact"."Total Case Handlers" , "HCBF"."Time"."Month of Year" , 1)
    I get the following error message:
    [nQSError: 27009] Unresolved identifier: "HCBF"."Time"."Month of Year".
    The function expression appears to be fine, month of year is numeric and total case handlers is a count.
    Can anybody help resolve this error message.
    Thanks

    Hi,
    An issue remains with the AGO function in BI Answers, when I try to run a report in answers with the new column created in the fact table I get the following error in the log file:
    Query Status: Query Failed: [nQSError: 22040] To use AGO function, the storage level of the query ('[Time.Dimension Key]') must be a static level.
    I am selecting month name(Filtered on May 2010) and choosing fact measures(total cases, lastmonthcases). lastmonthcases is the new logical column created using AGO function.
    Does this error look familiar, there is a time dimension key in the logical time dimension table but this is not referenced in the hierarchy.
    Thanks

  • How to display week wise data in ssrs report

    Hi,
    I want my report to fetch data from Financial year starting to till date.
    i.e Apr 2013 to till date.
    till date means Today() minus 8 days and @Fromdate includes last week of march also
    i.e Mar 29 2013 to Apr 4 2013 - this week data will also be included
    So data from Mar 29 2013 - Apr 4 2013  to today() minus 8 days need to be displayed
    How to fetch data for this.
    Pls advise.The column corresponding to this looks like "2013-11-01 ~~ 2013 - 11- 07"

    Hi, Well your requirement is very vague. I would probably have you create a calendar table according to your requirements and use it in your dataset. If you could better explain this with an example we could help you a lot better.
    Hope this helps.......
    Ione

  • Need a function Module to retrive the weekly absence data from PNP logical

    hi all,
    i have generated a report for absence data according to my report when u enter the start date and end date and absence type it will give u the list of employees and starting date and end date and absence hours.
    But my client wants the report in following format:
    YEAR    week number      number of absence hourse in that week
    2006  -
        WEEK  -
                  HOURS
    infotype is pa2001.
    thx in advance.
    Sunil

    Hi Sunil,
    I think you have to use zreport.
    Regards,
    kumar

  • Does OBIEE 11.1.1.7 support AGO function at Week level

    Hi,
    I have a time dimension with Year,Quarter,Month,Week and Day Levels.
    Year - 2013,2012...
    Quarter- Q1,Q2,Q3,Q4
    Month - 1,2,3..12
    Week - 1,2,...52
    Day - Date_id (20130101...(YYYYMMDD).
    My Keys are : Year Level(Year_Number)
    Quarter Level (Year+Quarter Number)
    Month Level(Year+Month number)
    Week Level(Year+Week number)
    Day - Date_id(also defined as chronological keys)
    I am creating a AGO(Measure,Level,1) in answers for Year and Week Level and they don't render correct results.
    I started building the hierarchy with only Year and Day levels..verified the results - Looks Ok.
    Similar fashion proceeded with Year,Quarter,Month and Day - Looks OK.
    When I introduce Week level - All the AGO values are incorrect.
    Any help on this is really appreciated.
    Regards,
    Swetha

    Thanks Srini Veeravalli for your reply.
    Yes I have verified it thoroughly.I have implemented this before on 10G for other customers and I don't feel that something is wrong with it .
    I found this link on AGO Function in OBIEE 11G:
    =======================================
    https://forums.oracle.com/message/9323083
    Does a month have always the same number of week and begin with the first day of a week ?
    If it's not the case, your dimension is not good when you make a report on the week grain for a year ago for instance.
    Here a check list:
    http://gerardnico.com/wiki/dat/obiee/ago_todate_configuration#timecalender_dimension_design_verification
    ============================================
    OBIEE 10G/11G - How to set up the time dimension (for time series functions Ago, Todate, ...) ? | GerardNico.com …
    In the above post also, Time dimension configuration for AGO/TODate ( Time series) are set up with 4 levels: Year,Quarter,Month and Day.
    So Just needed a confirmation  if week level shouldn't be in the hierarchy in 11.1.1.7.
    Regards,
    Swetha

  • AGO function in  11g

    Hi,
    Can any one have idea about AGO function in OBIEE 11g in Answers area?
    Please share the links regarding this topic.
    Thanks
    Arvnd

    Yes, it will work. Just double click the Time level (say year/month/week), mark it as a chronological key (on keys tab). Use that in your AGO function

  • [HELP] AGO function return wrong result

    Hi, i try to implement ago function in OBIEE, but the result is not as expected. Please help me to configure Time Dimension to get this work.
    My case:
    - I have a time dimension with this configuration:
    [http://i264.photobucket.com/albums/ii176/necrombi/NEO/1-1.png]
    Time Hierarchy: Total > Year > Quarter > Month > Day
    Year:
    Primary key: Calendar_year_cal_year_code
    Chronological key: Does not define
    Quarter:
    Primary key: Calendar_quarter_description
    Chronological key: Does not define
    Month:
    Primary key: Calendar_month_description
    Chronological key: Calendar_month_description
    Day:
    Primary key: Dimension_key
    Chronological key: Day_day_code
    My ago function: AGO(expression, mywh.D_qn_thoigianDim."month", 1)
    I do not understand why i get this wrong results:
    [http://i264.photobucket.com/albums/ii176/necrombi/NEO/2.png]
    Does anyone know how to solve this?
    Edited by: 864451 on Jun 8, 2011 5:11 AM

    Hi, thanks for your reply.
    I implemented Time dimension with your recommend, and have time dimension like this:
    Time Hierarchy: Total > Year > Quarter > Month > Day
    Year:
    Primary key: Calendar_year_start_date
    Chronological key: Calendar_year_start_date
    Quarter:
    Primary key: Calendar_quarter_start_date
    Chronological key: Calendar_quarter_start_date
    Month:
    Primary key: Calendar_month_start_date
    Chronological key: Calendar_month_start_date
    Day:
    Primary key: Day
    Chronological key: Dimension_key
    And Ago function works fine with month level: AGO(expression, mywh.D_qn_thoigianDim."month", n)
    But return sum result of 12 month with: AGO(expression, mywh.D_qn_thoigianDim."year", 1)
    In my case, i just use AGO(expression, mywh.D_qn_thoigianDim."month", 12) to get year ago value. But i still don't understand clearly about OBIEE Time Serries functions.
    Thanks,
    Dung Nguyen

  • AGO Function doesn't use full previous period

    Hi,
    I am using ago function in obiee 11.1.1.6. If my current period is April, AGO (quantity, MONTH, 1) only returns the data from 1 to 30th of March and not the full month. Seems it's trying to match the number of days in the current month and uses the same number of days in the previous month. Is this the known issue? Is there any workaround? I want full month data for the previous month using AGO function.
    TIA

    HI,
    Obviously it must use all the dates from the previous months, just check with dimension hierarchy you created.
    Take a look @ this mkashu.blospot.com/2013/08/obiee-model-time-series-in-obiee.html
    Regards,
    VG

  • BEX Query for Week, MTD, YTD  for Sales data

    Hi,
    I want to display the sales data for current  Calender day, Cal week, Cal Month to date, Cal Year to Date and also for previous year Cal month, Previous Year Calender Year to Date data.
    Structure is like this. for displaying Sales data. No variables are used on selection screen regarding below structure.
    Calender Day I CalWeek I CalMonth(current) I CalMonth(previous Year) I YTD(current) I YTD(previous Year)
    Please suggest me I used the variable 0P_HAPCY is enough or I have to do any other setups.
    Message was edited by:
            Kaveri

    Kaveri,
         I think 0P_HAPCY doesn't work for all the columns. Well when the user enters date it will also have the year and month right? So what is the relevance of year entered by teh user.
    For the data for calender day, you can get directly from the user entry.
    For calweek data you need to derive week from the calday enetered by the user using customer exit.
    Similarly for month to date, and year to date.
    Use offsets on customer exit variables for previous year calmonth and previous year yera to date data.
    Hope this helps you...

  • Week Ending Date Calculation

    Hi -
    I need to calculate weekending in OBIEE Answers.
    The week will start with Sunday and end with Saturday. The week ending date for this week should be Friday of this week.
    for example :
    7th October 2012 (Sunday) - 13th October 2012(Saturday) Week Ending date should be (12th October 2012)
    Thanks!

    user8021111 wrote:
    Hi -
    Sorry.. this doesn't solved my issue..
    for example in column A I have dates like
    Column A Column B(Should be populate the week Ending Date)
    30 SEP 2012 05 OCT 2012
    01 OCT 2012 05 OCT 2012
    02 OCT 2012 05 OCT 2012
    03 OCT 2012 05 OCT 2012
    04 OCT 2012 05 OCT 2012
    05 OCT 2012 05 OCT 2012
    06 OCT 2012 05 OCT 2012
    07 OCT 2012 12 OCT 2012
    08OCT2012 12 OCT 2012
    09 OCT 2012 12 OCT 2012
    10 OCT 2012 12 OCT 2012
    11 OCT 2012 12 OCT 2012
    12 OCT 2012 12 OCT 2012
    13 OCT 2012 12 OCT 2012
    The week ending date should be considered as friday of the week..the week will start from sat and end with sund.. this all should fall under friday of that week..
    Sorry for the inconvenience caused... Thanks again.
    Thanks,Next time give the examples the first time, it'll be easier to see. Here is the formula for column B:
    TIMESTAMPADD(SQL_TSI_DAY, DAYOFWEEK(column_A)*-1+6, column_A)

  • Need to create a report of Items sold= last sale date report

    Hi Guys,
    There is an column of last sale date in OITM but that doesnt gives any data when you run a query. Basicaly client need to generate a report of Items with last sale date, is this possible SAP Business One?
    Regards

    Hi Joe,
    you could use the stock posting list report with a suitable date range & select only AR invoices in the 'Expanded' options, then sort by posting date in descending order
    This report can then be exported to Excel & all irrelevant transactions can be deleted, keeping only the first & second row for each item (Row 1 = Itemcode, Row 2 = last stock posting from AR invoice showing in the 'Price after discount' column).
    Alternatively, you might explore whether an SDK solution  may be created that runs the last prices report for all items.
    All the best,
    Kerstin

Maybe you are looking for

  • DW freezes when I try to open a page from my site.

    It indicates that is downloading the support file, but when it gets to the point tha it displays the page in design view, the little indicator just spends. Eventually I will have to force close the program because it has stopped responding. Any sugge

  • Why doesn't 10.6.8 list the HP color laserjet 3600dn printer?

    I just updated a Macbook at work to 10.6.8 on my way to 10.7.  Thought I would make sure everything worked with this OS, and found that network printing does not work.  Removed and reinstalled printers, checked IP's - nothing but problems.  HP Color

  • Bridge CS4 gallery does not show in site in DW CS4

    I am trying to put a Bridge Gallery in a page in my Dreamweaver CS4 site. I found this discussion thread: http://forums.adobe.com/message/3549969#3549969 I read the discussion and followed their advice. It worked like a charm - - - - until I put the

  • Display two main reports in one

    Post Author: BSong CA Forum: Crystal Reports I am try to display both Customer Invoice and Payment reports in one report for a chosen Customer.  Since neither Invoice nor Payment should be sub report, how do I combine them together in one report two

  • Item not shown for clearing

    Hi everyone, I have a question for you concerning strange behavior of the clearing for vendor accounts. This is what it is about: I have a vendor let's say 12345. On this vendor's account I have two postings. One is posted with doc type KR (Vendor In