Level Number of Current member using MDX

Hi
What is the MDX formula for finding the Level number of the Current Member of the dimension? I tried the following as per the document but it says syntax error.
Year.CurrentMember.Level
Thanks
Kannan.

If you have registered a MemberListener on that replicated cache's cache service, you should have received a MemberLeft event when the replicated cache service been shutdown on that node unless the JVM has died or been killed thus coherence doesn't have chance to send out event.
Has anything unusual showed up in log?

Similar Messages

  • Querying last element in a dimension based on another level in the same dimension using MDX

    Summary: I need to write an MDX that returns the last date available in the level in the date dimension based for each month in the same dimension.
    Details: i have the a dimension which has the following levels. 
    Dim_Date :  Date (key) , Month (name of month), Quarter, Year.
    The query i m trying to come up with would return the result something like
    Month  || Max_date || measure1
    Jan         2014-01-25    100
    Feb        2014-02-28     200
    Please let me know if the above makes sense. Basically i m trying to get the max date for each month. 
    Thanks
    Sri

    Hi SrikanthGS,
    Assuming that with the last date available for the measure you mean the last date with non-empty figures, consider the following against the AW:
    SELECT [Measures].[Internet Sales Amount] ON 0,
    Generate (
    [Date].[Calendar].[Month].Members,
    ( Exists ( [Date].[Month of Year].[Month of Year], [Date].[Calendar].CurrentMember ),
    Tail (
    NonEmpty (
    Descendants ( [Date].[Calendar].CurrentMember, [Date].[Calendar].[Date] ),
    [Measures].[Internet Sales Amount]
    1
    ) ON 1
    FROM [Adventure Works]
    WHERE [Product].[Product Categories].[Subcategory].&[1]
    Philip,

  • Getting the number of pages in excel sheet or current page using OLE2

    Hi,
    I fill an excel sheet using CLIENT_OLE2 from Oracle 10g form,
    I want to get the number of pages in sheet or the number of current page,
    after searching for solution I found this example on VB:
    Sub GetPageCount()
    Dim iView As Integer
    Dim iHorizontalBreaks As Integer
    Dim iVerticalBreaks As Integer
    Dim iPageCount As Integer
    On Error Resume Next
    'go to the range and set PrintArea to the range name
    Application.Goto Reference:="ABC"
    ActiveSheet.PageSetup.PrintArea = Selection.Address
    'turn monitor flickering/updating off
    Application.ScreenUpdating = False
    'remember current View setting
    iView = Application.ActiveWindow.View
    'refresh the print area
    Application.ActiveWindow.View = xlPageBreakPreview
    'set view back
    Application.ActiveWindow.View = xlNormalView
    'turn monitor flickering/updating back on
    Application.ScreenUpdating = True
    'calculate the # of pages
    iHorizontalBreaks = ActiveSheet.HPageBreaks.Count + 1
    iVerticalBreaks = ActiveSheet.VPageBreaks.Count + 1
    iPageCount = iHorizontalBreaks * iVerticalBreaks
    How can I implement this using CLIENT_OLE2?
    Any assistance would be welcome.
    Thanks

    IF all the panels were exactly the same width (highly doubtful for a roll-fold) and IF ID supported 12 pages per spread (it doesn't) then it might be less work to make 12-page spreads and place the PDF twice, but since I think there's a really good chance you'll need to adjust the positioning for at least 22 pages, that seems doomed.
    I wouldn't even bother, in this case, with facing pages. Presumably they want this for the screen, so there's nothing gained from facing pages or multiple columns. You can either make the file with 24 pages and place the PDF 12 times for each page of the PDF, or place each page of the PDF once in a 2-page file, then copy the pages and reposition the image in the frame for each panel. The big thing here is to put the PDF into frames that are the same size as the new page (so they get cropped down to one-panel on each page). Then it's just a case of sliding the the PDF left or right in the frame to expose the next panel.

  • Help in creating MDX Calculated Member using attributes from multiple Dimension

    Hi All,
    First of all my knowledge on MDX is basic. In one of our projects, there is a requirement to create calculated member (similar to derived fields in SQL) which is more of a dimension attribute and not really a calculated member. Due to IP issues I cannot paste
    the actual queries but I will provide an SQL Query equivalent to what I am trying to achieve:
    Select P.Product, Case When ISNULL(FS.ArtistName,'') = '' Then P.ArtistName Else FS.ArtistName End Artist
     From
    dbo.FactMusicSales FS
    Join dbo.dimProduct P
    on P.DimProductKey =  FS.DimProductKey
    We are trying to replicate the logic for derving the "Artist" field using MDX script.
    We are running into issues while trying to build an MDX expression using the above logic. The main issue being that the new field/member "Artist" would not be calculated unless its elements are selected (FS.ArtistName, P.ArtistName). Besides this
    we are also unable to place this new member in a different folder other than a sub folder under the measures. Any pointers to solving this would be really helpful.
    Thanks in Advance,
    Venki

    Hi Venki,
    According to your description, you need to create calculated member (similar to derived fields in SQL) which is more of a dimension attribute and not really a calculated member, right?
    In your scenario, you needn't to achieve this requirement by using MDX. You can use a named query on your data source view. A named query is a SQL expression represented as a table. In a named query, you can specify an SQL expression to select rows and columns
    returned from one or more tables in one or more data sources. So in you scenario, you can use your query on the DSV, and then use the modified table to create a dimension.
    http://msdn.microsoft.com/en-IN/library/ms175683.aspx
    Regards,
    Charlie Liao
    TechNet Community Support

  • Creative Cloud Student and Teacher Edition .I use the Macbook.I got the mail that said my order was checked,but I don't get the number.So I still use trial.Hoe can I change my character into member?

    Creative Cloud Student and Teacher Edition .I use the Macbook.I got the mail that said my order was checked,but I don't get the number.So I still use trial.Hoe can I change my character into member?

    This is an open forum, not Adobe support... you need Adobe support to help
    Adobe contact information - http://helpx.adobe.com/contact.html
    -Select your product and what you need help with
    -Click on the blue box "Still need help? Contact us"

  • Creating buckets by comparing Dimension member against Measure using MDX

    I have a Product dimension which has hierarchies - product_id, initial_price, product_name, category and Measures - units_sold, cost_per_unit, revenue_per_unit. For each product_id I need to compare initial_price against revenue_per_unit and then assign it
    to a bucket based on the comparison. 
    Consider the following example:
    Input:
    product_id   initial_price revenue_per_unit
    1               10  
               12
    2               20  
               18
    3               30  
               35
    And if Product 1, 2 are in Category Book and 3 in Clothes then output should look like
    Output:
    Category  revenue type        Amount
    Book               Profit                
     2
                          Loss            
           2
    Clothes           Profit                   5
                          Loss                     0
    How can I achieve this using MDX?

    Hi Vijay,
    In your case, I couldn't found the "revenue type" attribute in the "Product" dimension. If you need to get the expected result, I suggest you calculate the amount at underlying data souce, and then retrieve the result set via MDX.
    Regards,
    Elvis Long
    TechNet Community Support

  • Can we Implement YTD using MDX syntax in olap universe.

    Hi,
    I am trying to implement YTD prompt from universe level. Can any one suggest how can i implement it using MDX syntax in olap universe.
    Regards,
    Anil Kumar.

    Hi,
    In MDX, you need to generate the technical name to have you expression valid.
    Moreover the correct syntax is: SUM(MTD(member),measure)
    So in your case the prompt must be constrained on the technical name and cannot be free, the correct syntax is:
    <EXPRESSION> SUM(MTD(@Prompt('YYYYMM','A','Cal. year / month\L01 Cal. year / month',mono,primary_key)),
    @(Select(Key Figures\Total Variance)) </EXPRESSION>
    Last, the result will be not really significant because you are asking for a MTD with a Year-Month as time member: the result will be the measure value for the selected month.
    In your case you need to have a time series function for an upper level like YTD or QTD. If you want to use MTD, the the time member selected would be at a lowest level, such as week or day.
    Regards
    Didier

  • Error extracting data from essbase cube using MDX method

    Hi,
    We have some problems extracting data from essbase cube using MDX method, we believe that the problem is the MDX query, this is the problem and query:
    ERROR:
    [DwgCmdExecutionThread]: Cannot perform cube view operation. Analytic Server Error(1260046): Unknown Member SELECTNON used in query
    com.hyperion.odi.essbase.ODIEssbaseException: Cannot perform cube view operation. Analytic Server Error(1260046): Unknown Member SELECTNON used in query
         at com.hyperion.odi.essbase.wrapper.EssbaseMdxDataIterator.init(Unknown Source)
    MDX:
    SELECT
    NON EMPTY {[YearTotal].[Jan]} ON COLUMNS,
    NON EMPTY {[Total Movimientos].[Presupuesto Base]} ON AXIS(1),
    NON EMPTY {[Año].[FY11]} ON AXIS(2),
    NON EMPTY {[Escenario].[Presupuesto_1]} ON AXIS(3),
    NON EMPTY {[Version].[Trabajo]} ON AXIS(4),
    NON EMPTY {[Moneda].[Moneda Input]} ON AXIS(5),
    NON EMPTY {[Centros de Costo].[1101]} ON AXIS(6),
    NON EMPTY {Descendants([Resultado Operacional],4)} ON AXIS(7)
    FROM [DSR02].[ROP]
    We try extract data using a sample cube and work fine, this is the mdx query:
    SELECT
    {[Actual],[Budget]} ON COLUMNS,
    {[Sales]} ON ROWS,
    NON EMPTY {[Product].levels(0).members} ON PAGES,
    NON EMPTY {[East].levels(0).members} ON AXIS(3),
    NON EMPTY {[Year].levels(0).members} ON AXIS(4)
    FROM Sample.Basic
    The model reversed ([DSR02].[ROP]) have the same structure than query need, the query and the model are fine, definitely we can´t see the problem, someone can help us?
    Regards

    You will be able to test the MDX query in EAS, it is usually best to test the query first before trying to use it in ODI.
    Is there any reason you are using MDX to extract the data, have you tried reportscript as I usually find it more efficient to extract the data.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Number of currently displayed rows in report with pagination?

    Maybe I'm thinking to complicated, but ...
    In my report I use the HTMLDB_ITEM.CHECKBOX function in order to display a checkbox for each row:
    HTMLDB_ITEM.CHECKBOX(1,"ID",NULL,:P311_ASSIGNED,':') " "
    Some of the checkboxes are selected depending on whether there is an entry for them in a database table.
    As the report returns hundreds of rows, I use pagination (e.g. 15 rows per page).
    After checking/unchecking the checkboxes and submitting the page by clicking the save button, I want to do the following: For each row CURRENTLY DISPLAYED on the screen (1) check, whether its checkbox is currently checked or not (2a) If it is checked and there is not yet an entry -> add row to the db table (2b) If it is unchecked and there is an entry in the db table -> remove row from db table.
    How can I, on the server side, find out which rows (row ids) are currently displayed (using pagination), so that I check each of the currently displayed row ids for their existence in the database table? Is there any item stored on the server side, which tells me the row number of the first row currently displayed? Is there an item I can refer to, which tells me the amount of rows, which are displayed on one page?
    Your help would be very much appreciated!
    Konrad

    Hi Konrad,
    I will jump in. :-) Just have a few minutes before a meeting.
    I think you don't have to make it that complicated, where you have to know the current pagination.
    1) Your HTMLDB_ITEM.CHECKBOX has to contain as checked value #ROWNUM# as the row selector would do it.
    2) You have to create a hidden item where you store your customer id
    3) create another hidden item where you store if the customer has already the assignment
    4) In your process you are now able to loop through your arrays.
    DECLARE
        vRowNumber BINARY_INTEGER;
        vFound BOOLEAN;
    BEGIN
        -- insert new event assignments
        FOR ii IN 1 .. WWV_Flow.g_f01.COUNT -- your checkbox
        LOOP
            vRowNumber := WWV_Flow.g_f01(ii);
            -- no assignment yet?
            IF WWV_Flow.g_f03(vRowNumber) IS NULL -- your hidden field where you store if you have an assmnt
            THEN
                INSERT INTO xxx VALUES (WWV_Flow.g_f02(vRowNumber)); -- your customer id
            END IF;
        END LOOP;
        -- delete old event assignments
        FOR ii IN 1 .. WWV_Flow.g_f03.COUNT -- your hidden field where you store if you have an assmnt
        LOOP
            -- only if the event was already assigned
            IF WWV_Flow.g_f03(ii) IS NOT NULL
            THEN
                vFound := FALSE;
                FOR jj IN 1 .. WWV_Flow.g_f01.COUNT -- your checkbox
                LOOP
                    -- is the event still checked?
                    IF WWV_Flow.g_f01(jj) = ii
                    THEN
                        vFound := TRUE;
                        EXIT;
                    END IF;
                END LOOP;
                IF NOT vFound
                THEN
                    DELETE xxx WHERE CUSTOMER_ID = WWV_Flow.g_f02(ii);
                END IF;
            END IF;
        END LOOP;
    END LOOP;Haven't tested the code, but I think it should show the idea.
    Hope that helps
    Patrick
    Check out my APEX-blog: http://inside-apex.blogspot.com

  • Combine two resultset sidebyside in coulmn using mdx

    hi i am new to mdx,
    i want to combine two select statement resultset (side by side like union) using mdx query,please any body help me to solve this query
    first query:
     SELECT
    { [Last Year] }
    ON COLUMNS,
     { {[Location].[Location].&[7], [Location].[Location].&[12], [Location].[Location].&[11],
    [Location].[Location].&[19], [Location].[Location].&[17], [Location].[Location].&[16],
    [Location].[Location].&[9], [Location].[Location].&[18] },{[Location].[Location].[All]}}
    ON ROWS
    FROM [Cube1]
    WHERE ( [Measures].[Labour %] )
    here [Last Year] is a calculated set
    {STRTOMEMBER("[Date].[Month].&["+ cstr(year(now())-2) +"-11-01T00:00:00]"):
            (STRTOMEMBER("[Date].[Month].&["+ cstr(year(now())-1) +"-10-01T00:00:00]"))}
    2nd query:
    WITH MEMBER [Measures].[Budget ] AS IIF(avg([Last Year],IIF(([Measures].[Budget]>0),[Measures].[Budget],null)),
                                            avg([Last Year],IIF(([Measures].[Budget]>0),[Measures].[Budget],null)),0.00),
    MEMBER [Measures].[YTD] AS IIF(avg([Last Year], IIF(([Measures].[Labour %]>0),[Measures].[Labour %],null))<>null,
                                  avg([Last Year], IIF(([Measures].[Labour %]>0),[Measures].[Labour %],null)),0.00),
    FORMAT_STRING = "Standard",
    BACK_COLOR = CASE WHEN [YTD] = 0  THEN /*White*/16777215 /*White*/  
    WHEN [YTD] <= [Measures].[Budget ] THEN 65408
         WHEN [YTD]<= [Measures].[Budget ] +5 THEN 65535
         WHEN [YTD]> [Measures].[Budget ] +5 THEN 255
    END,
    VISIBLE = 1
    SELECT
    {  [Measures].[YTD], [Measures].[Budget ] }
    ON COLUMNS,
    { { [Location].[Location].&[7], [Location].[Location].&[12], [Location].[Location].&[11], [Location].[Location].&[19], [Location].[Location].&[17], [Location].[Location].&[16], [Location].[Location].&[9], [Location].[Location].&[18]
    },{[Location].[Location].[All]} }
    ON ROWS
    FROM [Cube1]
    here   ==> [Measures].[YTD], [Measures].[Budget ] are calculated member
    i want result like in
    coulmns===> ytd,budget,nov,dec,jan,feb.,,,,,,,,,,out
    rows ====> are only locations and total(average of all locations)
    please guide me to get solution like mdx query

    Hi Vsp,
    According to your description, you want to create a calculated member to combine two members, and then set it as Default member, right?
    In SQL Server Analysis Services, we can use the script below to create a calculated members.
    create member currentcube.[Date].[Day of Week].[weekend]
    as
    {[Date].[Day of Week].&[6],[Date].[Day of Week].&[7]
    Every attribute in a dimension in Microsoft SQL Server Analysis Services has a default member, which you can specify by using the
    DefaultMember property for an attribute. This setting is used to evaluate expressions if an attribute is not included in a query. Please refer to the link below to see the detail information about specify a default member.
    http://technet.microsoft.com/en-us/library/ms174822(v=sql.105).aspx
    Regards,
    Charlie Liao
    TechNet Community Support

  • Rollover 18 weeks starting from week number of current month

    Hi,
    I have a requirement as described below.
    Table Name Time:
    Columns: Fiscal Year, Fiscal Month and Fiscal Week
    above table has join with sales table and it contain sales data on week basis. so least granularity of data at week level.
    we have a report with columns fiscal year, actual sales and forcast sales. our requirement is to filter the data with following criteria.
    Current Month Filter
    Jan fiscal week between 1-18 of current year
    Feb fiscal week between 5-23 of current year
    March fiscal week between 9-27 of current year
    November fiscal week between week 44 of current year and week 10 of next year
    December
    so with above requirement we need to filter data with rollover 18 weeks starting from week number of current month
    I tried with timestampadd(sql_tsi_week, interval, week) but it's not working as I expacting. Please provide the code/logic to get it done.
    Appreciate your help.
    Thanks
    Jay.

    Jay wrote:
    I need to get rollover 18 week data at anypoint of time starting with week number of 1st of every month to 18 weeks. read my question again and you will be able to understand.You're kind of missing the point to be honest. It's very hard to answer specific questions without the required information. To answer a question like this we need a minimum of:
    1. Oracle version
    2. Sample data (CREATE TABLE / INSERT statements)
    3. Expected output
    4. Explanation of business rules.
    Alternatively, you can read the link in my original response.
    Please provide the required information and someone can help.

  • How to get previous member of current member..

    Hi ,
    I have a period dimension like below. in the calculation script , I calculate each month and to do that I need to use previous member.
    I used @MEMBER(@PREVSIBLING(@CURRMBR("period"))) syntax. But this syntax does not work for apri, july and october.
    for april I need march but marc belongs to another parent so it is not a sibling of april. the syntax returns null member for april , july and october.
    I know @prior function but as far as I know it returns value not member or am I wrong. ?
    is there any way or function to get the previous member of current member.
    thanx.
    period
    yeartotal
    begbalance
    Q1
    jan
    feb
    mar
    Q2
    apr
    may
    jun
    Q3
    jul
    aug
    sep
    Q4
    oct
    nov
    dec

    hi krish,
    well , it worked I dont know how but I just used the syntax @CURRMBRRANGE ("yeartotal",lev,0,-1,-1) and I was able to calculate 12 months.
    I still have douts though. I read the info about @CURRMBRRANGE and it says "Currently, this function can be used only within range and financial functions, such as @AVGRANGE, @MAXRANGE, @COMPOUND, and @SHIFT". I have not used any of these or any other function in my script but it worked anyway.
    so thank you very much , you have been very helpfull to me. I love this forum :)
    regards.

  • Except function with parent child hierarchy using mdx query

    HI,
    I need to remove some items using mdx query in parent child hierarchy.
    I tried with below query,it is not removeing ,could you please help me.
    SELECT
    {[Measures].[Amount]} ON
    COLUMNS
     NonEmpty([Account].[Accounts].[Account Level 01],[Measures].[Amount])
    ON ROWS
    FROM (SELECT
    -Descendants({[Account].[Accounts].&[47]},,Leaves)
    } ON COLUMNS
    FROM [Adventure Works])
    indu

    Hi Indu,
    Why do you remove some itmes using
    Descendants function? Generally, we use FILTER function to achieve the requirement.
    WITH SET [CustomAccounts] AS
    FILTER ([Account].[Accounts].[Account Level 01].Members , [Account].[Accounts].CurrentMember.Name<>'Net Income')
    SELECT {[Measures].[Internet Sales Amount]} ON 0
    [CustomAccounts] ON 1
    FROM [Adventure Works]
    WITH SET [CustomAccounts] AS
    FILTER ([Account].[Accounts].[Account Level 01].Members , [Account].[Accounts].CurrentMember.Name='Net Income')
    SET [RemainingAccount] AS
    [Account].[Accounts].[Account Level 01]- [CustomAccounts]
    SELECT {[Measures].[Reseller Sales Amount]} ON 0
    [RemainingAccount] ON 1
    FROM [Adventure Works]
    Results.
    References.
    http://www.databasejournal.com/features/mssql/article.php/3306101/MDX-Essentials-Basic-Set-Functions-The-Filter-Function.htm
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/c0149678-97f2-4066-903f-7f9e9ff09b56/filtering-out-dimension-members-with-mdx?forum=sqlanalysisservices
    Regards,
    Charlie Liao
    If you have any feedback on our support,
    please click here.
    Charlie Liao
    TechNet Community Support

  • Bookmarks based on Word Headings lose the level number

    I have used Acrobat Pro 8 successfully for several years to create PDFs of Word 2003 documents with bookmarks based on Word Headings and custom styles.
    Occasionally a level number was missing from a bookmark but it was easy to correct the PDF. I'm still using the same software but now I find that level numbers are missing for all level 1 headings and many for levels 2 and 3 - too many to correct in the PDFs. I have checked and reset the conversion settings for bookmarks and also tried different combinations but the missing levels are not restored.
    Does anyone know of a workaround?

    Have you tried an update of both Acrobat and WORD. Sometimes WORD has issues and gets updated, not just Acrobat. It may be that you got a recent MS update to WORD that broke things.

  • How to take a 3d previous member of a current member in a YearTotal dim?

    Hello, im working with exchange rates table atm and there is a task to recalculate a cell in an April month using exchange rate from January and futher using the same algorithm.
    I tried shift, but it returns a cell value, and i need some analogue like @shift(@currmbr("YearTotal", -3)) but with a member return type.
    Goal is to take 3d previous member from current member of YearTotal (months) dimension
    Any suggestions, please?

    A very long list ... let me make it shorter.
    SQL> archive log list;If I see this:
    Database log mode              No Archive ModeI put the database into archivelog mode and leave it there forever.
    If it is in archivelog mode:
    RMAN> TARGET SYS/<password>@<service_name> NOCATALOG
    RMAN> BACKUP DATABASE PLUS ARCHIVELOG;Though there are a lot of things one could do better such as incrementals with block change tracking, creating an RMAN catalog, etc.

Maybe you are looking for

  • Electronic bank reconciliation -Rejected  transaction

    hi SAP expert I would like to ensure proper automatic accounting entries of rejected Bank transfer -RTGS, NEFT etc. . However through bank reconciliation i am not able to do so . Furhter bank passes both debit and credit entry with same amount and in

  • Disk Migration from Tiger-based iMac to Leopard MacBook

    A friend just bought a new MacBook (with Leopard). She wants to do a disk migration from her G5 iMac (running Tiger). Any issues I should know about when doing this? Or should I upgrade the iMac to Leopard before doing the disk migration? Thanks for

  • Problem with downloading TRAILERS from MusicStore

    Hello I'm trying to download a few movie trailers from the MusicStore. I've searched through this forum an found out that other users had the same question: How does it work??? There are people who say that there is a button "iPod" near "Small, Mediu

  • MicroCell not working after download of ios5

    Since downloading ios5 can't connect to MicroCell no matter what I try. Been on the phone with AT&T all morning.

  • Cannot install BootCamp-Software in Windows

    Hi! I have a little problem with the BootCamp-Software. When I want to install it in Windows (e.g. from the Mac OS X installation CD), this message appears: Windows Installer Installation Wrapper Dieses Patchpaket konnte nicht geöffnet werden. Stelle