Calculate Month-to-Date in Obiee11g

Hi,
I'm using OBIEE11g, im facing a problem-
Problem : Month-to-date  results of this month vs. Month-to-date results of previous month
example: if Im in 12th February the calculation is *1st February to 12 February* also *1st January to 12 January*
-Zia

Hi
I have an immediate requirement from my client as following.
I have prompts : Year, Month,Quarter and Date between
When the user selects an year --> then the headcount is calculated as following either Annulized/Monthlyor quarterly
HC= Sum(headcount of each day in that selected year) / No of days in the year
Similarly for Month,Quarter and date between.
If this is computed then I can apply the same logic for FTE calculation.
Any inputs or help greatly appreciated.
thanks in advance
hk

Similar Messages

  • How to calculate any two date with diffence calculation by using obiee11g?

    Hi,
    i have a requirement like,
    location wise current month and previous month with movement calculation,can to tell me how to calculate any two date with diffence calculation
    by using obiee11g
    Note,
    I tried to implemented ago function as well as dynamic two dates calculation using $2-$1 methods..but i am getting the o/p it's self i am getiing some null value also that' why it's not tallying with our actual report.
    i tired to used ifnull(mesaurecolumn,0) also case condition on the mesaure colution still it's not tallying.
    THanks and Rds,
    Devarasu.R

    Hi,
    for Date Difference........
    TimestampDiff(interval, timestamp1, timestamp2)
    ex:TimestampDiff(SQL_TSI_DAY, cast('1-apr-2011' as date), current_date)
    Where:
    interval
    The specified interval. Valid values are: SQL_TSI_SECOND, SQL_TSI_MINUTE, SQL_TSI_HOUR, SQL_TSI_DAY,
    SQL_TSI_WEEK, SQL_TSI_MONTH, SQL_TSI_QUARTER, SQL_TSI_YEAR.
    Cheers,
    Aravind

  • How to calculate a rolling 12 months to date calculation?

    Hi there
    We have a business requirement to calculate a rolling 12 month to date value. That is, for any month, sum up the last 12 months of data. E.g. for June 2011, its May 2010 -> June 2011. We have the standard Year and Period dimension, and the member which holds this calculation is in another dimension called TimeView. TimeView just holds dynamic calculations for Month To Date(MTH), Year To Date (YTD) etc.
    The problem I am having is because we have the standard Year and Period dimensions so I need to do a cross dimensional sum. All the solutions I am trying either give me an insufficient dynamic calc cache (increase lock block setting) or something similar. Our lock block setting is quite high and it doesnt seem to make a difference when I increase it.
    Anyway, I have tried a few solutions:
    Short one:
    @SUMRANGE("MTH",@MDSHIFT(@CURRMBRRANGE(Period,LEV,0,1,),-1,"Year",)) + @SUMRANGE("MTH",@CURRMBRRANGE(Period,LEV,0,,0));
    Long one:
    IF(@ISUDA(ACCOUNT,"Flow"))
         IF(@ISMBR(Jan))
              YTD->Jan + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Jan,-1,"Year",);
         ELSEIF(@ISMBR(Feb))
              YTD->Feb + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Feb,-1,"Year",);
         ELSEIF(@ISMBR(Mar))
              YTD->Mar + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Mar,-1,"Year",);
         ELSEIF(@ISMBR(Apr))
              YTD->Apr + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Apr,-1,"Year",);
         ELSEIF(@ISMBR(May))
              YTD->May + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->May,-1,"Year",);
         ELSEIF(@ISMBR(Jun))
              YTD->Jun + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Jun,-1,"Year",);
         ELSEIF(@ISMBR(Jul))
              YTD->Jul + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Jul,-1,"Year",);
         ELSEIF(@ISMBR(Aug))
              YTD->Aug + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Aug,-1,"Year",);
         ELSEIF(@ISMBR(Sep))
              YTD->Sep + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Sep,-1,"Year",);
         ELSEIF(@ISMBR(Oct))
              YTD->Oct + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Oct,-1,"Year",);
         ELSEIF(@ISMBR(Nov))
              YTD->Nov + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Nov,-1,"Year",);
         ELSEIF(@ISMBR(Dec))
              YTD->Dec
         ELSEIF(@ISMBR(Q1))
              YTD->Mar + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Mar,-1,"Year",);
         ELSEIF(@ISMBR(Q2))
              YTD->Jun + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Jun,-1,"Year",);
         ELSEIF(@ISMBR(Q3))
              YTD->Sep + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Sep,-1,"Year",);
         ELSEIF(@ISMBR(Q4))
              YTD->Dec
         ELSEIF(@ISMBR(H1))
              YTD->Jun + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Jun,-1,"Year",);
         ELSEIF(@ISMBR(H2))
              YTD->Dec
         ELSEIF(@ISMBR("YearTotal"))
              YTD->Dec
         ENDIF
    ELSEIF(@ISUDA(ACCOUNT,"First"))
         MTH->Jan;
    ELSE
    MTH;
    ENDIF
    I am sure this may be a common requirement across companies - does anyone know a solution to this?
    Much appreciated!

    Closing this thread, just needed to increase cache levels.

  • Month calculations: DATE() vs EDATE()

    In a recent topic (Challenge to get a date correctly), I mentioned using the DATE function to calculate a date that is (for example) one month later than a given one. Specifically, if cell A1 contains the given date, then I suggested using this formula for a date one month later:
    =DATE(YEAR(A1),MONTH(A1)+1,DAY(A1))
    Yvan Koenig suggested instead using the simpler EDATE formula, here equivalent to:
    EDATE(A1,1)
    There is, as it turns out, more than simplicity in favor of Yvan's approach. While one might expect the two formulas always to produce the same results, they do not! This is easily seen by constructing the following three column table with a column header:
    1. In cell A2, enter the last day of the first month of this year (January 31, 2008 in the U.S. system, for example). In the cell below it, enter the last day of the second month of this year (Feburary 29, 2008, for example).
    2. Next, select both cells & use the circular fill handle, drawing down to fill the column with a year or so of last-day-of month values.
    3. Select cell B1 (a header cell) & enter in the formula bar & press return:
    =DATE(YEAR(A),MONTH(A)+1,DAY(A))
    4. Likewise, in cell C1 enter:
    =EDATE(A,1)
    Note that the B & C column values are sometimes the same, sometimes not. The same results occur if the "1" in both formulas is replaced with another number of months.
    What seems to be happening is the 'MONTH(A)+n' expression uses the number of days in the month of the "A" cell value as the basis for the 'n months later' calculation, which is not the convention usually used for such things as billing cycles. The EDATE formula follows the normal convention, & is thus the preferred choice for almost all uses imaginable ... unless perhaps you are the one being billed.
    This also applies to 'YEAR(A) + n' calculations.
    So, it would seem that any calculation involving the DATE(year, month, day) form with an arithmetic operator in the year or month element should be used only with great care, if at all.
    BTW, the comments about the month unit of calendar time having "no real purpose today" in http://www.cl.cam.ac.uk/~mgk25/iso-time.html may be of interest.

    I'm aware of the blue warning triangle appearing in these "overflow" situations; however, even when it does not, the results may be different -- for example, with a starting date of January 31st, adding one month in my long formula produces a month argument that is in bounds but (for 2008) yields a date 2 days later than with the EDATE method.
    I don't view this so much a bug as a consequence of the vague nature of the "n months later" or of the "month offset" concept. As the cited scholarly article points out, the concept of the months of the year are of somewhat obscure mystic origins, & there lengths were arbitrarily set, often for reasons more political than practical. Between the 1st & 28th day of any month, the concept is unambiguous -- it is the same numbered day in the other month, but for the 29th through 31st day of the month it is not, depending on the starting month.
    From what little I have been able to discover from casual research, the EDATE results are the standard more by custom than by any well-defined rule: what we mean by the offset references the first, last, or some near-the-end-of-the-month day number, whichever seems the most suitable at the time.
    I do not have Excel on my Macs, but since the functions are similar, I would be interested in learning how that application behaves with this table.

  • How to make a report to display next 18 months of data with when user select a particular month from the filter in power pivot tabular model.

    Hi,
    i have a  dimension table  with month_key having values (201201,201202,201203.......202011,202012) and month name ( Jan 12, feb 12,......NOV 20, Dec 20)  and a fact  table with columns (month_key ,measure_types, Amount)
    My requirement is to create a power pivot report  in which when a user select a month from the filter, the report should display the (selected month+18 ) month's data against each type . when JAN 12 is selected ,the jan 2012 +18 = june 2013
    , month name should be populated with months till june 2013 only .
    i tried creating calculated column"END DATE " in the fact table with  dax expression to calculate the 18th monh from the current month  as below 
    month_key END DATE
    201201       201306    
    201202       201307      
    and thought of filtering the table with month key <= ENDDATE but it is not working as expected. could you please guide me on this ? Is there any time intelligence function that serve the purpose . Iam using  excel 2010
    ..hence could not do any calculation on the report side also. please suggest .
    Thanks in advance                                                                                                                                               

    Do you need to show the measure calculated for those 18 months as a total on 1 row, or do you need to select a single month and then display on row filters 18 distinct rows?
    The first is trivial as driezl has suggested.
    The second will require a second calendar table.
    I created this example workbook for a coworker who had a similar problem. You will have to use the disconnected table as your filter and pull your related table onto the rows.
    Finally, the easiest way to deal with the sort of date arithmetic you need to do is to restructure your date table to have a series of "Sequential" fields. These fields should be the number of units of time since the beginning of your calendar.
    For example, consider a calendar starting on January 1, 2010. For January - December 2010, [MonthSequential] = 1, 2, ..., 12. For January - December 2011, [MonthSequential] = 13, 14, ..., 24, and so on, incrementing by 1 for each sequential month in time.
    Assuming you have this set up in your date tables (one related to your model - DimDate - and one disconnected - DisconDimDate) your measure would look like this:
    18 Month Measure:=
    CALCULATE( [Measure]
    , FILTER( DimDate
    , DimDate[MonthSequential] >= MAX( DisconDimDate[MonthSequential] )
    && DimDate[MonthSequential] <= MAX( DisconDimDate[MonthSequential] ) + 18
    Please review this example along with the workbook I have linked above.

  • 12 months AGO date

    i have a ccan_dt(connection cancellation date) for every agent
    i am trying to calculate the amount the agents spend before 12 months of connection cancellation date ie ccan_dt
    agent ccandt
    a 14/8/2009
    b 12/7/2003
    c 08/10/2000
    d 7/8/1999
    select sum(spend),agent from spendmas where spenddt between d1 and d2 group by agent
    in the above d2 is the ccan_dt of each agent and d1 is 12 before date of d2
    can any one suggest the efficinet way of acheving this.
    i did this by creating a temp table to hold the dates and then calculated the spend.
    but how can i achevie this with out creating a temp table.
    is there any regular expression which can get 12 months ago date as in OBIEE.
    please advice..

    user633377 wrote:
    select sum(spend),agent from spendmas where spenddt between d1 and d2 group by agent
    in the above d2 is the ccan_dt of each agent and d1 is 12 before date of d2
    can any one suggest the efficinet way of acheving this.
    i did this by creating a temp table to hold the dates and then calculated the spend.
    but how can i achevie this with out creating a temp table.
    is there any regular expression which can get 12 months ago date as in OBIEE.
    please advice..Didn't quiet understand the need for a temp table.
    However you can get a date from 12 months before by using ADD_MONTHS Function.
    Something like:
    SQL> SELECT SYSDATE FROM Dual
      2  /
    SYSDATE
    20-AUG-09
    1 row selected.
    SQL> SELECT ADD_MONTHS(sysdate, -12) FROM Dual
      2  /
    ADD_MONTH
    20-AUG-08
    1 row selected.
    SQL>So your query might be changed to
      SELECT   SUM (spend), agent
        FROM   spendmas
       WHERE   spenddt BETWEEN d2 AND ADD_MONTHS (d2, -12)
    GROUP BY   agentAssumed d2 is cancellation date
    Hope this helps.
    Regards,
    Jo

  • Previous month end data for report

    Hi expert,
    I have to calculate previous month end data for my report.
    let say if user select 15 oct then he should be able to see 30 sept data.
    I have calander prompt.
    Thanks,

    Hi,
    Use presentation variable in date prompt.
    Apply sql filter(covert to sql) on report as date_column= TIMESTAMPADD(SQL_TSI_DAY,-DAYOFMONTH(date 'presntation_variable'),date 'presentation_variable')
    Refer : How to get LAST_DAY in obiee
    Regards,
    Srikanth

  • Getting Last Month End date

    Dear Experts,
    I want the following result. I have a date parameter. I want to
    get the last / end date of the previous month
    for any given date which the user inputs.
    For ex:
    If user puts the date 15.06.2008
    then i want to get the previous month end date i.e. 31.05.2008.
    The reason being i am creating a program for updating Opening and Closing Stocks of every month in a ZTABLE. The user will put the date in the parameter and system will bring the closing stock of previous month and then calculate for the current month.
    I hope i am not complicating matters too much....
    Basic funda is to arrive at the end date of the previous month for any date which the user puts.
    Please help me... it is mission critical..
    Thanks & Regards,
    Jitesh M Nair

    hi,
    use this to get last month end date.
    ex:
    data: d2 like sy-datum.
    d2 = sy-datum.
    d2+6(2) = '01'.
    d2 = d2 - 1. "prev mnth last date
    write:/ d2.

  • FOX to read previous month's data

    Hi Guys, i have the following FOX to calculate LINE '57' but cannot read previous month's data.
    please assist.
    DATA LINE TYPE ZBPLINE.
    DATA FISCPER TYPE 0FISCPER3.
    DATA PREV_MONTH TYPE 0FISCPER3.
    DO.
    PREV_MONTH = TMVL (FISCPER , -1) .
    {0BALANCE,FISCPER ,57} = {0BALANCE,PREV_MONTH,57} + {0BALANCE,FISCPER,12}.
    FISCPER  = TMVL(FISCPER , 1).
    IF FISCPER  > PREV_MONTH.
    EXIT.
    ENDIF.
    ENDDO.

    Lerato,
    I am not sure how is your data model, but here are a couple tips
    DATA LINE TYPE ZBPLINE.
    DATA FISCPER TYPE 0FISCPER3. ->>>>>  This sHould probably be 0FISCPER
    DATA PREV_MONTH TYPE 0FISCPER3. ->>>>>  This should probably be 0FISCPER
    data finalmonth type 0FISCPER3. ** or 0fiscper!
    finalmonth = TMVL(FISCPER , 12).
    *initialize you fiscper
    fiscper = '201001'. * or call a variable
    DO.
    PREV_MONTH = TMVL (FISCPER , -1) .
    {0BALANCE,FISCPER ,57} = {0BALANCE,PREV_MONTH,57} + {0BALANCE,FISCPER,12}.
    I am not sure what is 57 and 12. Is it your planning item?
    FISCPER = TMVL(FISCPER , 1).
    This exit if statement should be like this
    if FISCPER  > finalmonth.
    EXIT.
    ENDIF.
    ENDDO.
    Hope that helps
    Alex Zetune
    goldstrategy.com

  • Load monthly excel data in xcelsius

    Hi,
    I have 12 month of data for 35 KPI in excel sheet which needs to be updated every month when new data comes.
    I need to design a dashboard in xcelsius, can you please help me how can i design the architecture for this dashboard so that when excel sheet will be updated every month then data automatically refresh in dashboard.
    Any help or document with basic knowledge of architecture design will be appreciated.
    Thanks & Regards,
    Ram Krishna

    Hi Ram,
    Check the below threads, same thing disscussed:
    How to Dynamically Refresh data in Xcelsius 2008
    Update Excel sheet data automatically or Import Excel sheet automatically
    Regards,
    Javed

  • How to calculate the 'real data of arrival' in PO item

    Hi,
    Confirmation control keys with control type u201CDAu201D are MRP relevant
    1.     = New field time of transportation in calendar days
    2.     = Confirmation control type u201CABu201D (order confirmation)
    3.     = Confirmation control type u201CLAu201D (shipping notification)
    4.     = Confirmation control type u201CDAu201D (Date of arrival)
    When data 1-3 has been changed = 4 will be calculated again.
    Program requirements to calculate the u201Creal data of arrivalu201D:
    1.     When 1 >0 days then create 4 directly after placement of 2 (2 can be placed manually or automatically)
    2.     4 must be calculated: AB delivery date 2 + calendar date amount 1 = arrival date 4 (MRP gets a confirmed delivery      date by vendor plus transportation time)
    3.     When changes in 1 then change 4 (add calendar days to arrival date DA)
    4.      When changes in 2 then change 4 = u201Cnewu201D delivery date 2 plus calendar days 1 = new arrival date 4
    5.     When 3 u201CLAu201D is entered (manually/automatically) then calculate: shipping date LA 3 plus calendar days 1 = new arrival date in 4
    6.     When 1 has been changed then calculate 4 new (Check is 2 existing then use 2, check is 2 + 3 existing then use 3)
    7.     When 2 or 3 has been changed quantity then also update quantity in 4
    8.     When 2 has been canceled then cancel 4, too
    9.     When 3 has an inbound delivery document no. in place then copy the same no. in the inbound delivery field 4 and in the new column in MRP (MD04, see MRP view below)
    i have a lot of confuseging in this lines of code,even where u write i don't know in BADI . we are implement in BADI only.
    if possiable give me code for this requriment. . this line of code in which method we write,please guide me.............

    SDN is not your code factory, please research yourself before posting, maybe ask whoever handed you this requirement?
    Thread locked.
    Thomas

  • Process/Production Order WIP Reverse on Month starting date with postiing d

    Hi Experts,
    Is it possible to reverse the WIP of Production/Process Order at month starting date eg. 01/07/09. Posting date & Document date should be: 01/070/09.
    In my current project production is batch management system. Some of the batches start at month ending days (Eg. 29/06/09) for we calculated WIP at dated: 30/06/09.
    My Client wants to reverse that WIP next day, month starting hours Eg. 01/07/09 but while reversing the WIP system is posting the WIP reversing doc. posting date is 31/07/09.
    Same batch which started production on 29/06/06 is closed at 03/07/09 as well as goods received same date. FG Stock A/c updated in accounting books.
    At the same day If I print my trail balance system showing the Stock value double (WIP stock as well as FG stock)
    First Month
    Eg. Process Order WIP at 30/06/09                              : 50000/-INR
    Second Month
          WIP Reversal Posting date:31/07/09 by system     : 50000/-INR
          FG Stock received at 03/07/09                               : 50000/-INR
    If I Print Trail Balance on 03/07/09 system shows        : 1, 00, 000/-INR (based on Posting date)
    Which is wrong..
    Please tell me the way for Change the Posting date of WIP reverse document. OSS guys are replying as consulting issue. 
    I am waiting for your valuable reply.
    Thanks & regards
    Bhagiradha

    In KO88, CO88 Select Menu bar Extras-> Posting date
    Enter Posting and execute
    Thanks for Rajesh (SAP Labs)
    Thnaks & Regards
    Bhagiradh

  • Need a function to calculate employee attendance data for a given period

    need a function to calculate employee attendance data for a given period
    as
    Working days,
    CL ,
    SL,
    PL,
    LWP
    regards,
    Gaurav Sood.

    Issue resolved

  • Can I sign up for a month of data with Verizon without auto renewal and how long can I go without using my sim card before it is deactivated?

    When I checked out Verizon's data plans online, the only option I saw that did not involve automatic renewals was the option to pay $5 for a day of 300 MB. The other options (e.g., $20/month for 1GB) all appeared to involve automatic renewals every month unless I go in and cancel the plan. However, during a chat, a Verizon representative told me that auto renewal of the prepaid plans is an option that can be avoided, it just isn't listed in the online information. Has anyone found a way to only sign up for one month of data without having to cancel the next payment?
    Also, when I looked online at a site that compared data plans, it stated that one needed to use the Verizon network every 4 months or else the sim card would be permanently deactivated. But in a couple of online discussions, the limit was listed as being 3 months. Verizon told me 6 months. Does anyone know which is currently correct?
    Finally, I have heard that if the sim card does become deactivated, Verizon tends to insist on making one buy a new one with a regular data plan and not the prepaid options.Has anyone had any experience with this?

    GeekBoy.from.Illinois thank you for replying. I tried the Verizon support forum, but before I can ask a question there I need to register, and the first step in registering is entering my mobile phone number. Since I don't have a Verizon phone, I can't register and, therefore, can't ask any questions. I did look through previous questions and answers, but it only confirmed that Verizon employees do not give out consistently correct information. I guess I will try talking or chatting with two of three more of them and hope that whatever the majority answers are will be the correct ones.

  • Month to Date and Year to Date Scenarios

    <b>Dear SAP BI Gurus,
    Can anyone please give me guidance how to create a Month to Date and Year To Date Scenarios (Variables perhaps?) for 0SRR_CF_C1?  The date is in decimal and not DATE format…  I’m assuming the reason for this is to get the Time variance….  Nonetheless, I’d like to create a MTD and YTD scenario for reporting.
    Much Thanks
    Philips Manalaysay</b>

    Hi,
    You should take a look at the blog and doc below.
    /people/vikash.agrawal/blog/2006/10/17/enable-trend-reporting-150-by-manipulating-variable-value
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597335a
    Regards,

Maybe you are looking for

  • Some Files Cannot Be Moved

    I had to kill my old partition because it was only 32 GB, and now I get the error "Your hard drive cannot be partitioned because some files cannot be moved." I've defragged my HD, deleted some large files, and done pretty much everything I can think

  • Error while transporting transformations and datasource Urgent need Help

    Hi all, I have been working on this problem for a few days now. I created an ODS object, transformations,  DTP and I am using a  R/3 datasource for extraction. The ODS populates fine in the Dev box, the tranformations and the datasource are fine only

  • Sandbox still active for signed applet after 7u21

    Hi all, I develop a banking platform, it's deployed with a jnlp and signed with a verisign certificate. Since last 7u21 update it doesn't start because it gets an error in the permissions reading from user.home. Till now I've asked our users to go ba

  • Newbie ?? Using fillable pdf as template & restrictions

    I am using acrobat 9 pro extended & livecycle designer 8. What I want to do is make a fillable template (estimates & invoice forms) and then be able to save it two ways, one for me to continue to make changes and one for the customer where no changes

  • Web Gallery Renaming files what am I missing?

    When I run Web Gallery it renames my image files.  How do I keep my original names I have looked and cannot see a Preference for this Mike