Year to date average

Hi,
I have a report where I need to find the avg of sales for last year and current year.
I used Ago and Todate function to display the sales of last and Current year.
Users wants the avg of Current year .. for ex if they run report in june it should be YTD/6.. similarly if they run aug it is YTD/8
Please let me know how to find the a avg of Current year.

Hi,
Then use obiee- date expression method:
1) create alias table(u r fact table make it alias ) make join with date dime and measue join with
like that
"GPC_DataMart"."GPC_DataMart"."dbo"."LY_Position"."Business_Date"=
TIMESTAMPADD( SQL_TSI_DAY , -1, TIMESTAMPADD( SQL_TSI_DAY , EXTRACT( DAY_OF_YEAR FROM "GPC_DataMart"."GPC_DataMart"."dbo"."MT_BUSINESS_DATE"."Business_Date") * -(1) + 1, "GPC_DataMart"."GPC_DataMart"."dbo"."MT_BUSINESS_DATE"."Business_Date"))
it will bring like below
Last Year:
14-12-2011 into 14-12-2010
2) finally u can pull it current year as fact1 measure column and last year as alias fact measure 2( it will store base on users selected date) and current year is the fact1 column measue.
3) for the avarage u just make aggregation rule change to avg in you (make it pivot report then add to avg)
for more refeR:
http://obieeelegant.blogspot.com/2011/06/obiee-date-expressions-reference.html
Thanks
Deva
Edited by: Devarasu on Dec 14, 2011 8:57 PM

Similar Messages

  • Moving average price calculation based on year to date figures

    Hello,
    I've been working for months on the stock valuation at month end closing for the Finance department. We discover a situation where the moving average price is not calculated as we expected.
    The situation is as follows:
    2 purchase orders for the same material at different periods and with different purchase order prices
    the invoice of the first pruchase order has been recorded after the good receipts of the 2 purchase orders with purchase price variance, good issues have been recorded between the good receipts and the first invoice receipt, therefore the stock quantity is lower than the quantity invoiced
    the invoice of the second purchase order has been recorded as well with price purchase variance after the first invoice and after good issues, therefore the stock quantity is lower than the quantity invoiced.
    Here is an example with figures:
    SAP Calulation
    Good entry
    Good Issue
    Before Posting
    After Posting
    Good receipt
    Invoice receipt
    Date
    Movement
    Quantité
    Price
    Value
    Quantité
    Price
    Value
    Quantité
    Value
    PMP
    Quantité
    PMP
    Value
    Quantité
    PMP
    Value
    01.01.2014
    Intial Stock
    2000
    11
    22000
    16.01.2014
    Purchase Order 1
    10000
    10
    100000
    2000
    11
    22000
    12000
    10,17
    122040
    20.01.2014
    Good issue
    2000
    20340
    10,17
    12000
    10,17
    122040
    10000
    10,17
    101700
    18.02.2014
    Purchase Order 2
    20000
    9
    180000
    10000
    10,17
    101700
    30000
    9,39
    281700
    22.02.2014
    Good issue
    22000
    9,39
    206580
    30000
    9,39
    281700
    8000
    9,39
    75120
    30.03.2014
    Purchase Order 1
    10000
    9,5
    95000
    8000
    9,39
    75120
    8000
    8,89
    71120
    21.04.2014
    Good issue
    2000
    8,89
    17780
    8000
    8,89
    71120
    6000
    8,89
    53340
    31.05.2014
    Purchase Order 2
    20000
    7
    140000
    6000
    8,89
    53340
    6000
    6,89
    41340
    - When the first invoice is recorded, SAP calculate the MAP this way: ( 8000*9,39 + (95000-100000) * (8000/10000) ) / 8000 = 8,89
    - When the second inoice is recorded, SAP calculate the MAP this way: ( 6000*8,89 + (140000-180000) * (6000/20000) ) / 6000 = 6,89
    Moving average price calculation requirement
    Good entry
    Good Issue
    Before Posting
    After Posting
    Good receipt
    Invoice receipt
    Date
    Movement
    Quantité
    Price
    Value
    Quantité
    Price
    Value
    Quantité
    Value
    PMP
    Quantité
    PMP
    Value
    Quantité
    PMP
    Value
    01.01.2014
    Intial Stock
    2000
    11
    22000
    16.01.2014
    Purchase Order 1
    10000
    10
    100000
    2000
    11
    22000
    12000
    10,17
    122040
    20.01.2014
    Good issue
    2000
    20340
    10,17
    12000
    10,17
    122040
    10000
    10,17
    101700
    18.02.2014
    Purchase Order 2
    20000
    9
    180000
    10000
    10,17
    101700
    30000
    9,44
    283200
    22.02.2014
    Good issue
    22000
    9,44
    207680
    30000
    9,44
    283200
    8000
    9,44
    75520
    30.03.2014
    Purchase Order 1
    10000
    9,5
    95000
    8000
    9,44
    75520
    8000
    9,28
    74240
    21.04.2014
    Good issue
    2000
    9,28
    18560
    8000
    9,28
    74240
    6000
    9,28
    55680
    31.05.2014
    Purchase Order 2
    20000
    7
    140000
    6000
    9,28
    55680
    6000
    8,03
    48180
    - When the first invoice is recorded, SAP should calculate the MAP this way: (2000*11+10000*9,5+20000*9)/(2000+10000+20000) = 9,28
    - When the second inoice is recorded, SAP should calculate the MAP this way: (2000*11+10000*9,5+20000*7)/(2000+10000+20000) = 8,03
    Could you tell me if you know how to set up the calculation based on this formula (Intial stock value at MAP + Year to date Purchasing value) divided by (intial stock quantity + quantity purchased)?
    Thank you in advance
    Regards

    Arti,
    MBEWH table will get you the MAP of a material monthwise,I guess you need to get the logic which will use those details to arrive on MAP for a paritcular date.
    Check the SDN Forums with the keyword "MOVING AVERAGE PRICE REPORT" to get some lead.
    moving average price report
    K.Kiran.

  • Extract Month & Year  From Date

    Hi All,
    I have a key figure quantity and i want the data on date,for the month and for the year.
    i create the variables for the date,for the month(ie from date to date) and for the year(ie, from date to date) seperatly that means i have three input variables which may sometimes create confusion.
    My problem is that I want to enter only date and the variable itself calculate the month and year from the date so that it returns the data as desired above.
    for eg. : Now i to enter date : 3/14/2009
              enter MTD (FROM/TO) : 3/01/2009 - 3/14/2009
              enter YTD (FROM/TO) : 4/01/2008 - 3/14/2009
    I want to enter only date : 3/14/2009
    and the variable itself extract the month and year till date.
    and also the same variable calculates number of days so that need not to take the formula variable of date difference to calculate the average qty.
    Neha..

    Hi,
    1. Create User Entry Variable on 0CALDAY : Name = ZCDAY.
    2. Craete a Customer Exit Variable on 0CALDAY: Name  = ZMTD.
    3. Craete a Customer Exit Variable on 0CALDAY: Name  = YMTD.
    Properties of Customer Exit Variables.
    Variable reporesents = Single
    Variable Entry = Mandatory
    Processing By = Customer Exit.
    Character = Calender Day
    Here I'm thinking that ZKF is your key figure.
    In columns you create two selections one is for MTD and other is for YTD.
    In MTD selection, drag and drop ZKF and Drag and Drop 0CALDAY and then Right Clcik and Restrict-->
    Selection = Value Range. (In Between) and restrict with the follwoing Variables
    []ZMTD; ZCDAY.
    In YTD selection, drag and drop ZKF and Drag and Drop 0CALDAY and then Right Clcik and Restrict-->
    Selection = Value Range. (In Between) and restrict with the follwoing Variables
    []YTD; ZCDAY.
    Then write the following code in I_STEP = 2.
    DATA: ZT_DT1 TYPE SY-DATUM,
              ZT_DT2 TYPE SY-DATUM,
              ZT_SDT TYPE SY-DATUM,
              ZT_YR(4) TYPE N,
              ZT_DY(2) TYPE N,
              ZT_MT(2) TYPE N,
              ZE_TT(2) TYPE N,
              ZPOPER TYPE POPER,
             ZRELJR TYPE RELJR.
    WHEN 'ZMTD_A'.
      LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZCDAY'.
        IF sy-subrc = 0.
          CLEAR: l_s_range.
          ZT_DY = '01'.
          ZT_SDT = loc_var_range-low.
          ZT_MT = ZT_SDT+4(2).
          ZT_YR = ZT_SDT+0(4).
          CONCATENATE ZT_YR ZT_MT ZT_DY INTO ZT_DT1.
          l_s_range-low = ZT_DT1.
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          APPEND l_s_range TO e_t_range.
        ENDIF.
      ENDLOOP.
    WHEN 'ZYTD'.
      LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZCDAY'.
        IF sy-subrc = 0.
          CLEAR: l_s_range.
          ZT_DY = '01'.
          ZT_SDT = loc_var_range-low.
          CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
            EXPORTING
              I_DATE               = ZT_SDT
    *         I_MONMIT             = 00
              I_PERIV              = 'V3'
           IMPORTING
             E_BUPER              = zbuper
             E_GJAHR              = zbdatj
           EXCEPTIONS
             INPUT_FALSE          = 1
             T009_NOTFOUND        = 2
             T009B_NOTFOUND       = 3
             OTHERS               = 4
          IF SY-SUBRC <> 0.
             MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          CALL FUNCTION 'FIRST_AND_LAST_DAY_IN_YEAR_GET'
            EXPORTING
              I_GJAHR              = zbdatj
              I_PERIV              = 'V3'
           IMPORTING
             E_FIRST_DAY          = ZT_DT2
    *         E_LAST_DAY           =
           EXCEPTIONS
             INPUT_FALSE          = 1
             T009_NOTFOUND        = 2
             T009B_NOTFOUND       = 3
             OTHERS               = 4
          IF SY-SUBRC <> 0.
             MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          l_s_range-low = ZT_DT2.
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          APPEND l_s_range TO e_t_range.
        ENDIF.
      ENDLOOP.
    Thanks
    Reddy

  • SSRS expression for today,yesterday,Lastweek ,Last fortnight,Last Month, Year to date

    Hi All;
    I have a field called createdon 
    Using this field i need to create the SSRS expression for the table as below 
    Any help much appreciated
    Thanks
    Pradnya07

    use expressions as below
    assuming this is to be done in SSRS
    Today
    =COUNT(IIF(
    DateDiff(DateInterval.Day,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Day,Cdate("01/01/1900"),Now()),Fields!YourRequiredField.Value,Nothing))
    Yesterday
    =COUNT(IIF(
    DateDiff(DateInterval.Day,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Day,Cdate("01/01/1900"),Now())-1,Fields!YourRequiredField.Value,Nothing))
    LastWeek
    =COUNT(IIF(
    DateDiff(DateInterval.Week,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Week,Cdate("01/01/1900"),Now())-1,Fields!YourRequiredField.Value,Nothing))
    Last fortnight
    =COUNT(IIF(
    (DateDiff(DateInterval.Week,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Week,Cdate("01/01/1900"),Now())-1)
    Or (DateDiff(DateInterval.Week,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Week,Cdate("01/01/1900"),Now())-2),Fields!YourRequiredField.Value,Nothing))
    Last Month
    =COUNT(IIF(DateDiff(DateInterval.Month,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Month,Cdate("01/01/1900"),Now())-1,Fields!YourRequiredField.Value,Nothing))
    Year To Date
    =COUNT(IIF(DateDiff(DateInterval.Year,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Year,Cdate("01/01/1900"),Now())
    And
    DateDiff(DateInterval.Day,Cdate("01/01/1900"),Fields!createdon.Value) <= DateDiff(DateInterval.Day,Cdate("01/01/1900"),Now()),Fields!YourRequiredField.Value,Nothing))
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to fetch year till date value for earning for current ,last and year

    hi,
    how to fetch year till date value for earning for current ,last and year before that from payroll result
    plz reply soon,
    pratyush

    Dear Pratyush,
    Pick this from CRT.
    Use LDB PNPCE & Fire event GET PAYROLL &
    then you can pick from CRT.
    Hope this helps.
    Kindly reward in case useful.
    Regards & Thanks,
    Darshan Mulmule

  • Table for Year to date payments made to vendors

    Hi friends,
    I am generating one query, in which I have to show year to date payments made to vendors.
    can anyone tell me from which table and from which foield can I get this information.
    Please help.

    hi,
    GO to SE16 and select doc type wise , you will get a solution .
    i hope it helps you.
    regds,
    raman

  • HT2513 On iCal this year the date of shrove tuseday is showing on Tuesday 13 of February witch for a start is wrong coz it's a Thursday and wrong because its meant to be in march

    On iCal this year the date of shrove tuseday is showing on Tuesday 13 of February witch for a start is wrong coz it's a Thursday and wrong because its meant to be in march

    kaeandcolesmon,
    If you open the recovery drive (partition) it should only have a single folder (Recovery).
    To make sure that your not saving restore points to that drive.
    See:
    Start, Control Panel, System, System Protection tab. Make sure the D drive partition is set to OFF so that it does not save there.
    I am a volunteer. I am not an HP employee.
    To say THANK YOU, press the "thumbs up symbol" to render a KUDO. Please click Accept as Solution, if your problem is solved. You can render both Solution and KUDO.
    The Law of Effect states that positive reinforcement increases the probability of a behavior being repeated. (B.F.Skinner). You toss me KUDO and/or Solution, and I perform better.
    (2) HP DV7t i7 3160QM 2.3Ghz 8GB
    HP m9200t E8400,Win7 Pro 32 bit. 4GB RAM, ASUS 550Ti 2GB, Rosewill 630W. 1T HD SATA 3Gb/s
    Custom Asus P8P67, I7-2600k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX660 2GB, 750W OCZ, 1T HD SATA 6Gb/s
    Custom Asus P8Z77, I7-3770k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX670 2GB, 750W OCZ, 1T HD SATA 6Gb/s
    Both Customs use Rosewill Blackhawk case.
    Printer -- HP OfficeJet Pro 8600 Plus

  • Year to Date and Monthly totals

    I know that this is rather simplistic, but I'm new to Discoverer and need to set up a bunch of sales reports with MTD and YTD columns. I'm going to be using the same SQL query for many of my reports but customizing the reports to show sales by state, product line, etc.
    Is there a formula/function I can use in Discover for the Month to Date and Year to Date totals?
    Thanks,
    Joseph

    Hi Joseph
    You can use the analytic range SUM calculation for these. For the month to date, use the a PARTITION BY of month with a range of all the preceding rows in the partition up to and including the current row. For the year, you would simply change the PARTITION BY to be the year.
    Here are some examples drawn from my own database:
    I have the following items:
    ORDER_YEAR
    ORDER_MONTH
    ORDER_DATE
    SELLING_PRICE
    With these defined, the formula for month to date is:
    SUM(Sales.Selling Price SUM) OVER (PARTITION BY ORDER_MONTH ORDER BY ORDER_DATE ASC ROWS UNBOUNDED PRECEDING)
    The formlua for year to date is:
    SUM(Selling Price SUM) OVER(PARTITION BY ORDER_YEAR  ORDER BY  ORDER_DATE ASC  ROWS  UNBOUNDED PRECEDING )
    Basically what we are doing is telling Discoverer to SUM the SELLING_PRICE, and you should be able to take these and adjust them for your own report.
    Let me take a look at the month to end and describe what is going on. Basically the PARTITION BY is defining a set of rows which are to be included. In this case it is all rows that have the same ORDER_MONTH. The ORDER BY clause tells Discoverer to place the items in order, with the oldest order first. The ROWS UNBOUNDED PRECEDING tells Discoverer to SUM all of the items within the set (within the PARTITION BY) from the oldest item (UNBOUNDED PRECEDING) to and including the current item. We could have added a BETWEEN clause too but that is implied. With a BETWEEN clause it would look like this:
    SUM(Sales.Selling Price SUM) OVER (PARTITION BY ORDER_MONTH ORDER BY ORDER_DATE ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
    If you want the current row to be included with UNBOUNDED PRECEDING you don't need to explicitly name it because that is the default. Other options you could use are these:
    UNBOUNDED FOLLOWING - this SUMS to the end of the PARTITION
    ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING - you can guess that this will add all of the items, which you will rarely use because if you omit the ROWS command then this range between first and last is actually the default
    Rather than ROWS BETWEEN you can also say RANGE BETWEEN, like this:
    SUM(Sales.Selling Price SUM) OVER (PARTITION BY ORDER_MONTH ORDER BY ORDER_DATE ASC RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
    I hope this little dissertation on running totals helps.
    Best wishes
    Michael

  • Month to Date and Year to date calculation

    Hello Experts,
    It would be great If you could provide the formula to implement in BO universe or in the Reporting level for the below requirement.
    MTD, LastMonth, Year to Date, Last to LastMonth and examples are below.
    Last Week:
    Eg: Monday through Sunday
    Description: Based on Todayu2019s date, select the Monday of the previous week for the start date and Sunday will be the end date.
    Example:
    If Today is May 22, 2009
    The result would be, Monday = May 11, 2009, Sunday = May 17, 2009
    MTD:
    If Today is May 22, 2009
    I need a result MTD = May 1, 2009 u2013 May 21, 2009
    LastMonth:
    If Today is May 22, 2009
    I need a result LastMaont = April 1, 2009 u2013 April 30, 2009
    Last to LastMonth:
    If Today is May 22, 2009
    I need a result LastMaont = March 1, 2009 u2013 March 31, 2009
    Thank you.

    Nisniki,
    Here are the methods using WebI:
    MTD: 
    Create a local variable "MTD Start"
    =RelativeDate(LastDayOfMonth(RelativeDate(CurrentDate();-30));1)
    Create a local variable "MTD End"
    =currentdate()
    LastMonth
    =LastDayOfMonth(RelativeDate(CurrentDate();-30))
    Year to Date
    create a local variable "YTD Begin"
    =ToDate("01/01/"+FormatNumber(Year(CurrentDate());"####");"mm/dd/yyyy")
    (reuse "MTD End" or build a "YTD End" variable same as "MTD End")
    Last to LastMonth
    (similiar to MTD, but using "60" versus "30" to move back two months versus moving back 1 month.
    To perform this stuff in the universe requires an understanding of the SQL syntax for the paricular vendor your are working with.  ANSI SQL agrees to represent and compute dates uniformly, however, the functions to make it happen varies by the vendor.
    Thanks,
    John

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

  • Month-to-Date and Year-to-Date values in Query

    Hello experts,
    One of our BI reports has the following requirement: the user should be asked for the report date. After the user inputs the date, the report shows the key figures in three different "flavors": one is the values for that date, the second one is the cumulate values from the first day of the month of the report date to the report date itself, and the third is the cumulate values from the first day of the year of the report date to the report date itself.
      I created my report date variable based on 0CALDAY. Then I searched for SAP-exit variables that would help me achieve this, but could not really find any, except for 0P_ABO10, 0P_ABO11, 0P_ABO12 variables, all of them have as description "Start of Key Date Year". I tried creating a few selections in which the dates taken were defined as a range from each of these variables to the report date variable (for the year-to-date values), but I got the error "Variable 0P_ABO10 could not be substituted". I also got this error for the other two variables. And I could not find any SAP-exit variables like "Start of Key Date Month", in order to do the Month-to-Date part. My next try was to use the field "Key Date" with a variable in it, instead my own report date variable based on 0CALDAY, but it gave me the same errors.
    I searched the forums and found a few threads that looked useful, like
    First and Last day of month and
    1st day of month / 1st day of week variables
    However, they require some ABAP coding, and I do not know where to place the code (actually, I do not know where to work with ABAP code), and I also believe that I would have to do some changes to it.
    Any suggestions?

    Hi Pedro,
    You have to create customer exit in T_Code: CMOD
    1. Create a Z project
    2. Select RSR00001 as enhancement type.
    3. Go into include ZXRSRU01
    4. create a code like
    Here A is your variable based on 0calmonth with type customer exit and B is variable for 0calday.
    Try to write logic for your case taking this as example.
    WHEN 'A'.
        IF I_Step = 2.
          Loop at I_T_VAR_RANGE into L_T_VAR_RANGE where VNAM = 'B'.
            Concatenate L_T_VAR_RANGE-LOW(4) '001' into D1.
            Concatenate L_T_VAR_RANGE-LOW(4) '012' into D2.
            Clear L_S_Range.
            L_S_Range-low = D1.
            L_S_RANGE-high = D2.
            L_S_RANGE-sign = 'I'.
            L_S_RANGE-opt = 'BT'.
            Append L_S_Range to E_T_Range.
          ENDLOOP.
        ENDIF.
    If you want exact code I can help you in that.
    Thanks,
    Kams

  • Month and Year-To-Date Grouping

    Hello,
    I have 4 key figures.  For each of the key figures I need to display the value for the month and the value for the year-to-date.  Example, if the user selects October as the month the query should display only the totals for October and the totals from January to October.  The user does not want to see the totals for January, February, March and so on. 
    ........................Month of October.................Year-To-Date
    No. of Orders .................. 3,005..................... 22,950
    Order Value ..................190,000................ 5,900,000
    Canceled Orders .....................7........................... 60
    Value of Canceled Orders......700........................8000
    Can someone tell me how I go about doing that?

    Hello MIG,
    I guess you can create a structure for your key figures at the rows area of the query and a structure for your dates (e.g. fiscal periods) at the columns area. For your columns, you will need two restricted key figures. The first key fgure will be for your user's current month (e.g. Oct) -- this will be equal to fiscal year/period restricted by a user entry variable for the current month. The second key figure will be for your year to date KF (e.g. Jan to Oct) -- this will be equal to fiscal year/period restricted by a customer exit variable that computes for the date range between Jan and the user's current month. <b>OR</b> you can ask the user to input the initial date (should be defaulted to Jan 2006*) and the current month in a date range -- this will be an interval variable. Hope this helps.
    Juice

  • How to derive month/year from date in SAP BW 3.5 data flow

    Hi
    How we can derive cal year/month and fiscal month/year from date in SAP BW 3.5 data flow (we're using transfer and update rule)..
    Thanks,
    PK

    Hi,
    if you have any date filed in source side you can just map to any time char system will automatically convert to target objects.
    please look at the screen shot for understanding. (not 3.x it is 7.x)
    Thanks,
    Phani.

  • Return current period based off of current fiscal year and date

    Good Afternoon,
    Is there a way in the webi that I can create a dimension that always reflects the current Fiscal Month based of Fiscal year and date? I have a report that I am trying to show sales for a customer based off the current fiscal month. I would like this report when refreshed to be based off this fiscal month dimension instead of showing each fiscal month or changing it manually. What is the best way to do this?
    I have attached an image that shows current numbers by period (month) and then the YTD Totals. I would like to have my 'Period' column always reflect the current period and the Total column to reflect that months totals based off the period column. So for this period (3), instead of seeing 3 lines for each month I would just see the '3' and the total as $541,310.46, monthly as 412,502.09 and my YTD as 1,080,091.06.
    Any help is always appreciated!
    Thank you,
    Tiffany

    Hi,
    Create a variable
    FlagVar=If([Period]=Max([Period]) In Report;"Show";"Hide")
    And apply block filter of FlagVar=Show
    Are these coming TotalSales  MonthlyGoal YTDSales directly from universe? If they are calculated at report level then you might want to use NoFilter. like =NoFilter([YTDSales])

  • Extracting year and date

    I am working on the following query
    SELECT report_date, EXTRACT (MONTH FROM report_date) FROM program_details;
    SELECT a.customer_id, a.report_date as change_date
    FROM program_details AS a
    LEFT JOIN program_details AS b
    on a. customer_id = b. customer_id
    AND EXTRACT (MONTH FROM a.report_date) = EXTRACT (MONTH FROM b.report_date) - 1
    AND EXTRACT (YEAR FROM a.report_date) = EXTRACT (YEAR FROM b.rpt_date )
    WHERE a.code_status = 'Gold' and b.code_status = 'Plat'
    AND a.report_date >= '2007-12-01 00:00:00.0'
    AND a.report_date < '2009-01-01 00:00:00.0'
    I have a table with customer id, yyyy-mm-dd for many years , and status as gold silver or platinum. and I need to work out the month that the status changed, and return a field as year-month.
    I am trying to extract the year and date that a customer changed from gold to plat but I am not sure how date arithmetic works. I need to have output like : customer_id and year-month but I keep just getting month.
    I know this is vague, but if you could help with the part of the query that delivers year and month back that would be great.
    Thank you very much

    Hi,
      1  SELECT a.customer_id, to_char(a.report_date, 'yyyy-mm') as change_date
      2* FROM program_details a
    SQL> /
    CUSTOMER_ID CHANGE_
              1 2009-06Bartek

Maybe you are looking for

  • Adobe CS6 Apps Shuts Down After Installing Creative Cloud.

    I can't start my Photoshop, Illustrator or InDesign CS6 anymore, it just shuts down as soon as it's done loading, without any errors. Only Bridge CS6 will start. I tried launching with Ctrl+Alt and Ctrl+Alt+Shift but it did not work. Then I tried uni

  • Java Threads

    Dear Friends, My problems is How many maximum Threads will allow in Linux OS. How can we see. I had one Program1(It is Thread It wont End) which will create threads and It will Place all threads in the Queue. These Threads will intracts with data bas

  • Want to upgrade my processor but dont know what i can go to

    I have a HP G60 with an Intel Celeron 900 @ 2.20 Ghz. Thanks for any help

  • Is DBMS_CRYPTO FIPS 140-2 certified?

    Sadly, I think that the answer is no. I am hoping someone more knowledgeable can contradict me. This link describes the Oracle Database FIPS certification status. http://www.oracle.com/technology/deploy/security/seceval/oracle-fips140-validations.htm

  • Use 2 different fonts in a dynamic text field with tf.htmlText?

    i've got a dynamic text field on the screen and all of my fonts embedded. is it possible to use 2 different fonts when dynamically setting the fields text with the htmlText property? i've tried the <font> and the <textformat> tags and neither work. I