Extract a month from date hierarchy

I have ssrs report based on cube. I have a date hierarchy where. date hierarchy is Year-Quarter-MonthYear. EG
2014-Q2-May,2014. as labels display
Values is like this:[Date].[Year to Month].[Month].&[2002]&[7]. How Can I extract month number like 7 from here so that I can do less than or equal in IIF is ssrs charts.
I want to compare months with user input month so that I can restrict data in charts. If user select march,2014. I will display data from Jan 2014- Mach 2014 for actual.

How is the user selecting the month? Is month parameter a free text field? If you're using MDX itself to populate month values then selected month value would be passed in same format itself ie [Date].[Year
to Month].[Month].&[2002]&[7] etc
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Similar Messages

  • Error in running Extract Definition Upload from Data File concurrent.

    Hi all,
    Am trying to upload the 834 Extract Layout from the data file by running the concurrent program, Extract Definition Upload from Data File.
    After running this concurrent program am getting the Extract Layout definition with Record layout and Data elements within it.
    But some record layouts has the changes at their repeating level in that.
    Please suggest me how do i get the same repeating levels for the record layouts when i move the 834 benefit extract layout definition
    from one instance to another instance.

    Hi,
    We have exactly the same error in IBolt. This error happens sometime and we don't find the reason.
    IBolt has been upgraded to Version 3.1 SP1 and a fix has been developed by the support. After installation, we've work hardly during 2 days for testing all the flows by the customer without having this error.
    Ibolt works as a service and when this error occurs, the service stopped and must be restarted.
    In our flows, we have put a delete of the observer.dll file just before the rest of the flow but it doesn't solve the problem.
    Deleting the directory can be temporarly a solution but the error come back another day.
    Each time the SBO client or DTW is started, the %temp%\SMS_OBJ_DLL directory is created...
    When you just delete the observer.dll file and leave the rest of the directory like it is, the file is re-created when you start and log to SBO. I would say that this file is a copy of another file observer_800178.dll (800178 depending of the version of SBO yoi have). 800178 corresponds to SBO 2007 A PL 42.
    Do you have more information since your post has been send ?
    Thanks in advance for your help.
    Best regards.

  • Picking Month from Date in ABAP query

    Dear All,
    I want to pick month from date in a abap query but it is giving error "BDTER" is not a valid comparison operator. comparison operator.
    Where i am wrong my query is below.
    SELECT SUM( BDMNG ) AS BDMNGT FROM RESB INTO CORRESPONDING FIELDS OF IT_MRP
    WHERE MONTH( BDTER ) = '12'.
    With Regards
    Ashwani K Mathur

    Dear Deepankar,
    Thanks for reply.
    Date fomat is yy/mm/dd (like 20071231) after your suggestion i have modified query.
    SELECT SUM( BDMNG ) AS BDMNGT FROM RESB INTO CORRESPONDING FIELDS OF IT_MRP
    WHERE  BDTER+4(2)  = 12.
    but while compiling it is giving error Field "BDTER+4(2)" unknown.
    Please suggest.
    Ashwani K Maathur

  • Extracting month from date

    hi,
    I have a query in Informix which get the month part of a date. Please help me in converting the same to oracle.
    Informix query
    select month(col1 - today) from tab1;
    col1 is a date field, today will yield the current date and month function will get the month of the date.
    In oracle, when we subtract two dates we will get a number value, how to convert that back to date and extract the month part.
    Help me?????
    Regards,
    Gopu

    select months_between(sysdate, col1)
    from tab1;
    This will return a decimal value representing the months and part month between the two periods. The later date should be specified first, or the result will be a negative value.

  • Using the EXTRACT function to get year and month from date

    Hello~
    I am trying to extract the month and year using the query below but am getting the error:
    Query cannot be parsed within the Builder
    select     distinct city AS "CITY",count(MOTOR_ASSIST2.CITY) as "COUNT"
    from     "MOTOR_ASSIST2" "MOTOR_ASSIST2"
    where
    (:P53_FISCAL_YR IS NULL OR :P53_FISCAL_YR = MOTOR_ASSIST2.FY)
    *OR (:P53_MONTH IS NULL OR EXTRACT(MONTH FROM :P53_MONTH) = MOTOR_ASSIST2.DATETIME)
    OR (:P53_YEAR IS NULL OR EXTRACT(YEAR FROM :P53_YEAR) = MOTOR_ASSIST2.DATETIME))*
    GROUP BY MOTOR_ASSIST2.CITY
    ORDER BY CITY
    Can anyone help me figure out what im doing wrong?Thanks
    Deanna

    1. Whats the value of year you are passing here ??
    2. Whats the value of months you are passing here??
    Select City As "CITY", Count(Motor_Assist2.City) As "COUNT"
      From "MOTOR_ASSIST2" "MOTOR_ASSIST2"
    Where ((:P53_Fiscal_Yr Is Null Or :P53_Fiscal_Yr = Motor_Assist2.Fy) Or
           (:P53_Month Is Not Null Or :P53_Month = Motor_Assist2.Month) And
           (:P53_Year Is Not Null Or :P53_Year = Motor_Assist2.Year) And
           Datetime >= To_Date(:P53_Year||:P53_Month, 'YYYYMON') And
           Datetime > Add_Months(To_Date(:P53_Year||:P53_Month, 'YYYYMON'), 1)
    Group By Motor_Assist2.City
    Order By City
    SQL> Select Sysdate From dual Where Sysdate = To_Date('2008'||'SEP', 'YYYYMON');
    SYSDATE
    Select Sysdate From dual Where Sysdate = To_Date('2008'||'SEP', 'YYYYMON');
    SYSDATE
    SQL> Select To_Date('2008'||'SEP', 'YYYYMON') From dual;
    TO_DATE('2008'||'SEP','YYYYMON
    9/1/2008
    will give you sept 1st or 1st day of the month,
    hows the data in your datetime column or variable ???
    SQL> Select Sysdate From dual Where trunc(add_months(last_day(Sysdate),-1) +1) = To_Date('2008'||'SEP', 'YYYYMON');
    SYSDATE
    9/12/2008 3
    SQL>
    there both side of '=' yield first day of sept ...
    SQL>

  • Extract the Month from the day with Query designer ...

    Hi everybody,
    Is there exist a method in Query designer to extract the CalMonth (Date Month) from the CalDay ?
    Thanks!
    Rodolphe.

    take reference from this step by step doc:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597335a

  • BI- Extract Hour:Min from date and get Avg

    Hi there,
    am working on BI answer and trying to get the average of the working hours of the departments. The Working Hrs column is Date format in the Database. And I managed with Forum help to Extract the Hours from this column and do the average through the BMM in the RPD on the Fact table as following:
    EXTRACT( HOUR FROM "Ain_Access"."Fact_Access"."Working Hours")
    Now on the BI Answer results I have 8 instead of 08:57.
    But what I need is to Extract the Hour and the minuets and get their AVG.
    Appreciate your help,

    Averaging column with date/time format in BI Answer
    this expression will work:
    (60 * EXTRACT( HOUR FROM "Ain_Access"."Fact_Access"."AVG Working Hours" ) + EXTRACT( MINUTE FROM "Ain_Access"."Fact_Access"."AVG Working Hours" )) / 60
    but only if this "AVG Working Hours" is DATE type.... and this look like strange name fore DATE? "AVG" is average, aren't?
    Arent u need to use "Working Hours" instead of "AVG Working Hours" ?
    like this:
    (60 * EXTRACT( HOUR FROM "Ain_Access"."Fact_Access"."Working Hours" ) + EXTRACT( MINUTE FROM "Ain_Access"."Fact_Access"."Working Hours" )) / 60
    all best
    phenix

  • Restrict last date of month from date picker

    Hi All,
    I have a requirement to restrict the date picker.
    I want to allow the user to select only the last date of the month from the following four months march, June, September and December.
    I have googled about this i couldn't get related that except that restrict invalid days/months.
    Please suggest to find solution for this.
    My Jdev version is 11.1.2.0.0
    Thanks in advance,
    SAN

    Hi,
    Have a backing bean to construct a list of days to be disabled and set that to disabledDays property of the picker component.
    Ex : Re: Bug on the property "disabledDays" of the component af|inputDate ?
    -Arun

  • Get month from date

    I want to get the month from a date. I know how I can get it from today's date, but let's say I have a pre-defined date like:
    String myDate = "11/15/89";How can I get "November" from that?
    Edited by: TheTitans on Feb 12, 2009 4:56 PM

    SimpleDateFormat[http://java.sun.com/docs/books/tutorial/i18n/format/simpleDateFormat.html]
    ~

  • Extract Year (only) from Date Field and Display in Text Field

    I need to extract the year from a user entered date field and display the year in a text field. Can someone help me with the correct script to do this?

    Hi,
    that's quite easy to realize with FormCalc.
    In you date fields exit event add the following code:
    textField1 = Num2Date( Date2Num($.formattedValue, "MM/DD/YYYY"), "YYYY")
    Note: This sample assumes that your date field formats the date with "MM/DD/YYYY". You may have to change the pattern to make it work at your end.

  • How to extract only month and date ?

    Hi All,
    I have a problem to query the customer details. It goes this way, Today is 02-AUG-2007, when i issue my query today, irrespective of the year, takin only the date n month i.e 02-AUG into consideration and comparing it with birthdate column in the customer table, such that birthdates (irrespective of the year) which are in 15 days before or after 02-AUG must be displayed.
    Example. SYSDATE : 02-AUG-2007,
    OUTPUT: All B'Dates which are in the range 17-JULY(SYSDATE-15,irrespective of year) to 17-AUG(SYSDATE+15,irrespective of year) irrespective of year must be displayed.
    Regards,
    SAM

    or like this:
    with bd
    as ( select sysdate -16 dt, 'A' as pt from dual
    union all select sysdate-15, 'B' from dual
    union all select sysdate-14, 'C' from dual
    union all select sysdate, 'D' from dual
    union all select sysdate+14, 'E' from dual
    union all select sysdate+15, 'F' from dual
    union all select sysdate+16, 'G' from dual
    union all select sysdate - (365-15), 'H' from dual
    union all select sysdate - (365+14), 'I' from dual
    union all select sysdate - (365+16), 'J' from dual)
    select to_char(dt, 'MM/DD') as bd, pt from bd
    where to_date(to_char(dt, 'MM/DD/')||to_char(sysdate, 'YYYY'), 'MM/DD/YYYY') between sysdate - 15 and sysdate + 15
    I see this was part of the above suggestion :)
    Message was edited by:
    smccull

  • CAML Query to get Items based on Year and Month From Date Column

    Hi All,
           * As we knew that there are default columns in calendar like Stattdate,Title,Location..etc.
            * I required the CAML Query to get the list items of calender of particular Month and Year,So that I can get number of items or evetns are in Calendar
    Can any one help me how can I do this using caml query
    Samar

    Hi Stuart,
                 Thanks for your response,I had chosen 2nd option of our above mention suggestion.But when I try to fetech the data from a calendar it is showing below error .I
    had checked the below code with oter lists by changing Type to text and it worked fine.Can you please help me how can I fetech for the calulated columns
    Error
    "One or more field
    types are not installed properly. Go to the list settings page to delete these
    fields. "
    Code:
     string year="2014";
                string month="February";
                SPSite mysite = SPContext.Current.Site;
                SPWeb myweb = mysite.OpenWeb();
                try
                    SPList mylist = myweb.Lists["Calendar"];
                    SPQuery myquery = new SPQuery();
                    myquery.Query = @"<Where>
                                          <And>
                                           <Eq>
                                             <FieldRef Name='Year'/>
                                             <Value Type='Calculated'>"
    + year + @"</Value>
                                          </Eq>
                                          <Eq>
                                             <FieldRef Name='Month'
    />
                                             <Value Type='Calculated'>"
    + month + @"</Value>
                                          </Eq>
                                         </And>
                                      </Where>";
                    SPListItemCollection totaltiems = mylist.GetItems(myquery);
                   Label1.Text= "Total Number of Items is "+" "+totaltiems.Count.ToString();
                catch (Exception ee)
                    Label1.Text = ee.Message;
                finally
                    myweb.Dispose();
    Calculated Columns
    Samar

  • 834 Benefit Extracts - Error in Extract Definition Upload from Data File

    Hi all,
    I try uploading the Extract Definition of 834 Benefit Extract definition data file to create 834 Benefit Extract File layout in the system.
    But it has errors as mention below and no clue in it to get through with the uploading process .
    am providing the error info which i got from the log file.
    Upload from stage tables
    Error loading seed data for EXT_WHERE_CLAUSE8: FILE_NAME = ALB_ANSI-834 Full Profile, RECORD_NAME = ALB SE - Transaction Set Trailer, DATA_ELEMT_NAME = ALB SE01_Total, PARENT_RECORD_NAME = ALB SE - Transaction Set Trailer, PARENT_ELEMENT_NAME = , DATA_ELMT_NAME = ALB SE01_Total, COND_DATA_ELMT_NAME = ALB SE01_REF, ORA-01403: no data found
    Start of log messages from FND_FILE
    WARNING : Element ALB INS04 Decode Value 14 not uploaded
    WARNING : Element ALB INS04 Decode Value 03 not uploaded
    WARNING : Element ALB INS04 Decode Value 01 not uploaded
    WARNING : Element ALB INS04 Decode Value 07 not uploaded
    WARNING : Element ALB INS04 Decode Value 04 not uploaded
    WARNING : Element ALB INS08 Decode Value FT not uploaded
    WARNING : Element ALB INS08 Decode Value TE not uploaded
    WARNING : Element ALB INS08 Decode Value RT not uploaded
    WARNING : Element ALB DMG05 Decode Value O not uploaded
    WARNING : Element ALB DMG05 Decode Value J not uploaded
    WARNING : Element ALB DMG05 Decode Value H not uploaded
    WARNING : Element ALB DMG05 Decode Value I not uploaded
    WARNING : Element ALB DMG05 Decode Value B not uploaded
    WARNING : Element ALB DMG05 Decode Value A not uploaded
    WARNING : Element ALB HD03 Decode Value PPO not uploaded
    WARNING : Element ALB HD03 Decode Value PPO not uploaded
    WARNING : Element ALB HD03 Decode Value PPO not uploaded
    WARNING : Element ALB HD05 Decode Value SPO not uploaded
    WARNING : Element ALB HD05 Decode Value ESP not uploaded
    WARNING : Element ALB HD05 Decode Value EMP not uploaded
    WARNING : Element ALB HD05 Decode Value E1D not uploaded
    WARNING : Element ALB HD05 Decode Value FAM not uploaded
    WARNING : Element ALB HD01_TERM Decode Value 024 not uploaded
    WARNING : Element ALB HD01_TERM Decode Value 024 not uploaded
    End of log messages from FND_FILE
    thanks & regards,
    V.Leelaprasath.

    Hi
    Use the  PERFORM OPEN_GROUP after the enddo.
    open dataset v_data for input in text mode encoding default.
    do.
    read dataset v_data into < itab-fields>
    if sy-subrc <> 0.
    message e001(yarcjosh).
    else.
    Append itab.
    clear itab.
    endif.
    enddo.
    perform open_group.
    loop at record.
    perform bdc_dynpro using 'SAPLMGMM' '0060'.
    endloop.
    Reward points if useful
    Regards
    Anji

  • Getting Month from date

    Hi All,
           I have two date characteristics Start date and Pricing date. now i need to create a query, showing the month of start date and Pricing in two seperate columns.
    suppose start date = 08/15/2007
                 pricing date = 10/20/2007
    then in the query i need to have two columns with output
    Start data month... |.........pricing date month
    ..........08..............|......... 10
    Any advice on how to acheive this.
    Thanks
    Kumar

    Try this
    DATA: L_S_RANGE TYPE RSR_S_RANGESID.
    DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
    CASE I_VNAM.
    WHEN 'yourvar'.
    IF I_STEP=2. "after the popup
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'variablename where user entry'.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = LOC_VAR_RANGE-LOW+4(2). "YYYYMMDD
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
    EXIT.
    ENDLOOP.
    ENDIF.

  • How to extract month from given date in bpel??

    Hi friends hi need some information  regarding dates in BPEL.. Here in these I taking date as input which type is also date type.Then required output is month in number format.. Here I  used Assign activity and in assign activity,I took month-from-date and passed argument to this function.But it raised an error "internal Xpath error" Any one can you give me ideas please....

    First convert you date into datetime and then use the month-from-datetime function.
    Regards,
    Anshul

Maybe you are looking for

  • BB Z30 - Upgrade to version 10.2.1.3247 - Improved battery life

    On 09.09.2014 I got a notification about an available OS upgrade to version 10.2.1.3247 and I installed it. After the upgrade the battery life of my BB Z30 improved dramatically. Thank you BB Team!

  • Snow leopard server

    After a brief DNS change my Server Preferences Settings (only Users ad Groups) has disapeared - the server however, is running fine. The User Passwords are still functioning fine as well - I just can not see the Users and Groups anymore displayed wit

  • Found original box for Adobe Premiere Pro 2.0

    found original box for Adobe Premiere Pro 2.0 bought back in2009/2010, need to get activation code for it please. PN: 25520367 Faye

  • Java SOAP

    Hi, Until now I have used the Apache-SOAP and I have decided to test the jax-rpc from sun. I am a little confused, I don't understand why jax-rpc uses stub - skeletons ? (the apache implementation does not !) and if it uses, how could be theses servi

  • How to install display language if not listed i have an htc 8x

    hello i frem greece and i just bought an htc 8x.I want to add greek as a display language because it is not listed does anybody know how?step by step please because i am new here!