MDX question using MDXTEST

Hello.  I was wondering if anybody has any experience using MDX to return an XMLA result set for a query that contains a hierarchy. Any help of simple example would be helpful.  We are trying to use the MDX web service within BI and are testing out various MDX queries.
Thank you.

Hello Aron,
Please see this doc
[Load Testing Web Services in ESA with Custom Examples|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60f4cabe-0401-0010-fbba-fae6c7a8d29e]
See this blog as well
[SAP Network Blog: Work with XMLA Web Service for BI Data in External Applications!|/people/prakash.darji/blog/2006/09/04/work-with-xmla-web-service-for-bi-data-in-external-applications]
Other docs
[Web Dynpro Java Application to Execute MDX Query Using the Business Intelligence Java SDK|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60f35908-ecd4-2910-6c89-e75e1054d9d1]
[Using the MDX Editor (SAP Library - SAP NetWeaver Visual Composer: User Guide)|http://help.sap.com/saphelp_nw04/helpdata/en/45/f33574fee1487f9b8487d2986a2658/frameset.htm]
Thanks
Chandran

Similar Messages

  • Question using Java API in a multi threaded application for MDX queries

    Currently I’m building a web application that makes a lot of MDX calls using the Essbase Java API. Each time we run an MDX call we basically run the following code:
    IEssbase ess = IEssbase.Home.create(IEssbase.JAPI_VERSION);
    IEssDomain dom = ess.signOn(userName, password, false, null, "embedded");
    IEssCubeView cv = cv=dom.openCubeView("view", hostName, appName, cubeName);
    IEssOpMdxQuery op = cv.createIEssOpMdxQuery();
    op.setQuery(false,mdx,false,IEssOpMdxQuery.EEssMemberIdentifierType.NAME);
    cv.performOperation(op);
    IEssMdDataSet mddata = cv.getMdDataSet();
    cv.close();
    My questions is, is this the correct way to use the API in multi threaded environment where many users may be hitting the application at the same time? For every request do I need to create a separate IEssbase object and sign on to an IEssDomain? Or can I use a single IEssbase and IEssDomain object for the entire application? If not should I call the IEssDomain.signOff() method after each user’s request has completed? Which of the above objects are thread safe? I’m using Essabae 9.3.1. Any insight would be really appreciated.
    Thanks
    David

    Thanks for the input friend,
    I should have mentioned that in my application all
    connections to Essbase use the same user name and
    password so the filtering isn’t a concern. This is my
    first Java application using Essbase has a data
    source, I’m used to connecting to various SQL
    databases and I always use a connection pool, how is
    connection pooling handled in the Essbase java API?I'm not sure what happened to it since I never used it, but there used to be something called the High Availability Services or something that was essentially a connection pool for Essbase JAPI connections, but it required an extra license.
    Since you don't care about identity (everyone has full access to everything), you can create your own connection pool, but you'll have to manage your multithreading yourself. Its been this way since the beginning. The C API isn't/wasn't thread-safe either (we tried).

  • Statistical calc with MDX question (Mode function as an excel)

    Hi All,
      I need to create an MDX Calc to Returns the most frequently occurring, or repetitive, value in an array or range of data.
      For example, the mode of 2, 3, 3, 5, 7, 10 is 3.
      In Excel I use the MODE() function but I don't know how to do this in MDX and add it as a measure in Universe.
      I can't do the formula in WEBI because we have big data volume and I can't retrieve all the customers in WEBI.
      We have SAP BW 7.0 and SAP BusinessObjects XI 3.1 fix pack 1.3
    Thanks in advance.

    Hi,
    it looks like you created the entry twice so I would suggest you close on of them:
    Statistical calc with MDX question (Mode function as an excel)
    I don't think that those kind of statistical functions are available in MDX. you can always go to se37 and use the bapi_get_functions to see the list of supported functions.
    Ingo

  • How to generate mdx query using C#

    I am new to mdx query and i am very curious about mdx query generation using c# so i searched for any demo or open source then i found
    Ranet.olap, which is providing what i need. After taking the dlls i tried to incorporate them in my code. I am pasting my full
    console code which should generate mdx query but it's not doing so, Am i doing something wrong.
    using System;
    using System.Collections.Generic;
    using Microsoft.AnalysisServices.AdomdClient;
    using Ranet.Olap.Core.Managers;
    using Ranet.Olap.Core.Metadata;
    using Ranet.Olap.Core.Types;
    namespace MDX
        class Program
            static void Main(string[] args)
                startWork();
            public static void startWork()
                string connString = "Provider=MSOLAP.3; Data Source=localhost;Initial Catalog=AdventureWorkDW2008R2;Integrated Security=SSPI;";
                CubeDef cubes;
                AdomdConnection conn = new AdomdConnection(connString);
                conn.Open();
                cubes = conn.Cubes.Find("AdventureWorkCube");
                Ranet.Olap.Core.Managers.MdxQueryBuilder mdx = new Ranet.Olap.Core.Managers.MdxQueryBuilder();
                mdx.Cube = cubes.Caption;
                List<Ranet.Olap.Core.Wrappers.AreaItemWrapper> listColumn = new List<Ranet.Olap.Core.Wrappers.AreaItemWrapper>();
                List<Ranet.Olap.Core.Wrappers.AreaItemWrapper> listRow = new List<Ranet.Olap.Core.Wrappers.AreaItemWrapper>();
                List<Ranet.Olap.Core.Wrappers.AreaItemWrapper> listData = new List<Ranet.Olap.Core.Wrappers.AreaItemWrapper>();
                //Column area
                Dimension dmColumn = cubes.Dimensions.Find("Dim Product");
                Microsoft.AnalysisServices.AdomdClient.Hierarchy hColumn = dmColumn.Hierarchies["English Product Name"];
                //hierarchy properties
                List<PropertyInfo> lPropInfo = new List<PropertyInfo>();
                foreach (var prop in hColumn.Properties)
                    PropertyInfo p = new PropertyInfo();
                    p.Name = prop.Name;
                    p.Value = prop.Value;
                    lPropInfo.Add(p);
                Ranet.Olap.Core.Wrappers.AreaItemWrapper areaIColumn = new Ranet.Olap.Core.Wrappers.AreaItemWrapper();
                areaIColumn.AreaItemType = AreaItemWrapperType.Hierarchy_AreaItemWrapper;
                areaIColumn.Caption = hColumn.Caption;
                areaIColumn.CustomProperties = lPropInfo;
                listColumn.Add(areaIColumn);
                //Rows Area
                Dimension dmRow = cubes.Dimensions.Find("Due Date");
                Microsoft.AnalysisServices.AdomdClient.Hierarchy hRow = dmRow.Hierarchies["English Month Name"];
                List<PropertyInfo> lRowPropInfo = new List<PropertyInfo>();
                foreach (var prop in hRow.Properties)
                    PropertyInfo p = new PropertyInfo(prop.Name,prop.Value);
                    lRowPropInfo.Add(p);
                Ranet.Olap.Core.Wrappers.AreaItemWrapper areaIRow = new Ranet.Olap.Core.Wrappers.AreaItemWrapper();
                areaIRow.AreaItemType = AreaItemWrapperType.Hierarchy_AreaItemWrapper;
                areaIRow.Caption = hRow.Caption;
                areaIRow.CustomProperties = lRowPropInfo;
                listRow.Add(areaIRow);
                //Measure Area or Data Area
                Measure ms = cubes.Measures.Find("Order Quantity");
                Ranet.Olap.Core.Wrappers.AreaItemWrapper areaIData = new Ranet.Olap.Core.Wrappers.AreaItemWrapper();
                areaIData.AreaItemType = AreaItemWrapperType.Measure_AreaItemWrapper;
                areaIData.Caption = ms.Caption;
                List<PropertyInfo> lmpropInfo = new List<PropertyInfo>();
                foreach (var prop in ms.Properties)
                    PropertyInfo p = new PropertyInfo(prop.Name, prop.Value);
                    lmpropInfo.Add(p);
                areaIData.CustomProperties = lmpropInfo;
                listData.Add(areaIData);
                mdx.AreaWrappersColumns = listColumn;
                mdx.AreaWrappersRows = listRow;
                mdx.AreaWrappersData = listData;
                string mdxQuery = mdx.GenerateMdxQuery();
                conn.Close();

    Hi mkm1,
    According to your description, you want to use C# code to generate MDX Query. Right?
    In Analysis Servcies, we just need to use "Microsoft.AnalysisServices.AdomdClient.dll" to open connection to SSAS database and retrieve data from cube. Here are some sample code about executing MDX query using C#.
    Dim objConnection As New AdomdConnection("Data Source=localhost;Initial Catalog=Adventure Works DW 2008;")
    Dim objCommand As New AdomdCommand()
    Dim objDatatable As New DataTable
    Dim strCommand As String
    strCommand = "SELECT [Measures].[Internet Sales Amount] ON COLUMNS, "
    strCommand = strCommand & " [Date].[Calendar].[Calendar Year] ON ROWS"
    strCommand = strCommand & " FROM [Adventure Works]"
    objConnection.Open()
    objCommand.Connection = objConnection
    objCommand.CommandText = strCommand
    Dim objDataAdapter As New AdomdDataAdapter(objCommand)
    objDataAdapter.Fill(objDatatable)
    objConnection.Close()
    Since your code is more related to a third party API, we suggest you post your question to Rnet.
    Reference:
    Microsoft.AnalysisServices.AdomdClient Namespace
    If you have any question, please feel free to ask.
    Simon Hou
    TechNet Community Support

  • Interactive questions using IP/TV

    I am interested in how users can post questions using IP/TV while the presentation is ongoing. What is the process behind this as I don't really see how it works, any kind of insight would be useful.
    Many thanks Alex

    When you set up the program, you can (or not) enable interactive "from the field" questions.
    The client provide a button that can be pressed to flag the presenter that a field question is pending.
    The presenter can then address the questions as possible.
    Depending on the scope and location of the audience, you may also consider bringing up a conference bridge for voice-based questions.
    Good Luck
    Scott

  • Is this now where to ask DVD Studio Pro questions?  If not, please let me know where.  Here's my question:  Using DVD Studio Pro 3, when trying to burn a disc which is 4.5GB, I get error message "Not eough disk space in target folder".  What to do?

    Is this now where to ask DVD Studio Pro questions?  If not, please let me know where.  Here's my question:  Using DVD Studio Pro 3, when trying to burn a disc which is 4.5GB, I get error message "Not eough disk space in target folder".  What to do?

    Thanks.  Unfortunately, I need to make a master DVD that can then be duplicated in bulk as a single layer disc.  This surprises me because I tried burning a different DVD project that has worked in the past which is also 4.5 GB and now I could not burn that either.  I also reencoded some material to get the new project down to 4.4 GB but it still would not burn.  Any ideas are appreciated.

  • How to Generate a MDX statement using a BEX query

    Hello,
    Is there any possiblity in BW to generate a MDX statement using a BEx query?
    Thanks,
    Ravi

    BW does not generate any MDX statement for Bex query.I have tried ample number of times to acheive this but failed.
    Like an Infocube the Query is also an object where in you can write MDX queries on BEx Queries.
    As it is I never found BW rendering MDX queries.But with MDX queries you can get something but how far it helps I don't know.
    RSCRM_BAPI is obsolete and it is recommended to use RSCRM_REPORT somewhere I have read ,but when I went to that transaction I never found that "MDX" button at all.
    It was converted to "OLAP Check" which gave me some warning on the key figures and that's it.
    Somehow I feel BW is not comfortable with MDX.
    Regs
    Gopi

  • HT5312 i could not follow anything, it needs to be clearer, and i all i wanted was to find the answers to my questions, you told me how to make an itunes account. and i'm pretty sure the questions used to be "first teacher" and "favorite teacher"not partn

    HELP i just could not figure out how to find the answers to my security questions, and i do believe that the questions used to be "who was your first teacher" and "who was your favorite teacher" but now the second one is "where did you and your partner go on there first trip together, so now i'm wondering if i dont even have the answers anymore! why, have you changed the questions, and i really am having trouble following the help pages. i need help, it wont let me buy any songs or apps, so i've been saving the links and names to songs.

    We are fellow users on these forums, you're not talking to Apple or iTunes Support.
    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then steps 1 to 5 on the page that you posted from should let you reset them : go to https://appleid.apple.com/ and click 'Manage your Apple ID' on the right-hand side of that page and log into your account, then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you should see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then you won't get the reset option - you will need to contact iTunes Support / Apple to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down the page that you posted from to add a rescue email address for potential future use.

  • Very simple question: using XWS to generate static data

    Hi,
    I'm testing interop for JWSDP and a soon-to-be-released RSA Security, Inc. product that will also provide WSS as well as XML signatures, XML encryption, ...
    I have already used JWSDP -- xmldsig -- to generate a bunch of XML docs that were signed using JWSDP (all varieties of KeyInfo, signing algos, ...).
    I need to do something similar for WSS -- using xws-security.
    Do I need a Web container in order to be able to do this? (Again, recalling that all I want to do is generate thousands of encrypted, signed, encrypted & signed, signed & encrypted SOAP messages (using UsernameTokens, X509Tokens, ...))
    Do you have any examples that might save me some time?
    I have looked through all of the examples in the "interop" and "simple" subdirs of the "samples" subdir of "xws-security" and most of these presume that there's some RPC going on, which doesn't really fit the model of what I'm trying to do here. Got any ideas? Even basic ones? Even big ones?
    TIA.
    Liz

    I've kinda answered my own question in part:
    SecurableSoapMessage ssm = new SecurableSoapMessage(soapMessage);
    ssm.setFilterParameter(FilterParameterConstants.BINARY_SEC_TOKEN,new X509SecurityToken(ssm.getEnvelope().getOwnerDocument(),cert));
    ExportCertificateTokenFilter estf = new ExportCertificateTokenFilter();     
    estf.process(ssm);
    ExportSignatureFilter esf = new ExportSignatureFilter(new DirectReferenceStrategy(cert));
    esf.process(ssm);
    that transforms the soap message, adding the wsse xml, then I try to sign it:
    SignFilter sf = new SignFilter(new X509IssuerSerialStrategy(cert));
    sf.process(ssm);
    and this fails saying I don't have a privatekey, which makes sense. I need to create a DefaultSecurityEnvironmentImpl probably, define the key in there and then attach that to the SecurableSoapMessage? The problem is, I have the cert and privake key stored on files, how do I go about loading that into the SecurityEnvironment? Would this SecurityEnvironment handle cert chain validation then, since it can be constructed with a trusted keystore?

  • How do I create a check-box matrix question using Acrobat XI Pro?

    I would like to insert a question that is a 10 x 10 matrix that allows respondents to select multiple boxes in each row.  For example, the "add item > rating scale" feature formats a matrix the way I would like, although it only seems to allow for radio buttons.  With this feature, respondents can only select one item per row.  Is there any way to use this feature with check-boxes rather than radio buttons?  Or a different feature to create a matrix that allows for multiple selections per row? 
    Thanks so much,
    Andy 

    I created a 30 page Form in Microsoft Word with 20 to 30 check boxes on each page using the Zapf Dingbats Font.
    When I used Acrobat XI Pro to automatically convert the form it fails to create usable check boxes.
    It worked properly about 3 times on test pages but it will not do it again.
    Manually inserting check boxes one by one on 30 pages is mind numbing to say the least.
    Why doesn't the software work properly anymore?

  • Is there a way to restrict the number of attempts for a remediated question using advanced actions?

    I have the following slides in my project:
    content slide 1
    content slide 2
    question slide 1
    question slide 2
    Question slide 1 is a question about content slide 1. Question slide 2 is a question about content slide 2. I would like to restrict the total number of attempts to two for each question. If question 1 is answered incorrectly on the first attempt, the learner would be returned to content slide 1 for review. Clicking the next button will take the learner back to the missed quiz question and allow them a second attempt to answer it correctly. If they answer it incorrectly again, it is scored as incorrect and the learner is taken to question slide 2.
    Can this be done or does remediation keep repeating until the learner answers the question correctly?
    If that is the case, can I achieve my objective by using advanced actions? And, if so, can you provide step by step instructions on how to do this?

    I think it could be possible, but giving you step-by-step instructions, sorry, that would take a lot of time. Did you use advanced actions already? My archived blog has a lot of use cases and tutorials, but I think it is not fair to ask on a forum for step-by-step instructions for each use case you want to create.  The most important thing will be to make sure that the user always remains in the Quiz scope, you can use the new system variable cpInQuizScope while testing. There is no system variable for attempts on question level, only one on Quiz level, so you'll have to create a user variable to track the attempts on question level. A big problem is that when you leave a question slide, without using the remediation work flow, the attempts are considered as finished. Personally I would prefer for that reason to not use the default question slides. You could try out a combination of remediation and advanced actions, never did test that?
    Lilybiri

  • Beginner's question:  Using Time Machine with a WD External Drive

    Hello folks,
    Could someone help me with some basic questions?
    I have a MacBook with Mac OSX 10.5.5. It has Time Machine but I've never used it before. I've just obtained a Western Digital External Hard Drive which is Mac compatible but, I'm told, may not be formatted for Mac.
    1. If that's the case, how do I format it for Mac so that I can use it with my MacBook? Or can I just plug-and-play?
    2. Once ready to use, I'd like to use the external drive for two purposes: (a) to create back-up images of my entire computer using Time Machine, and (b) as a second drive where I can just drag-and-drop selected files when needed (e.g. so that I can put photos in a photo folder on my external instead of on my MacBook hard drive). Will my MacBook let me do this, or will using Time Machine effectively reserve the entire external hard drive for Time Machine and not allow my to drag-and-drop files?
    Thanks! And Happy New Year!

    Question 1:
    1. Launch Disk Utility (in your Applications/Utility folder.
    2. Click the "erase" tab
    3. Select your entire WD disk on the sidebar (the uppermost icon).
    4. Format: "Mac OS Extended (Journaled)"
    5. Name the Disk
    6. Click on "erase"
    Question 2:
    What is the size of your drive? If it is large enough you can partition it but Time Machine backup will "grow". So if it's important to you to save all backups you'll want to give it the whole disk. If not, you can partition the disk at the same time you format it.
    Follow the steps here. It will accomplish both Q1 & Q2.
    -mj
    Message was edited by: macjack

  • Scratch Disc Questions using Firewire External Drive & Imac

    Hello. I've read through the existing questions regarding scratch disc and Photoshop, yet can't seem to find an answer to my questions. I would greatly appreciate any tips/advice. Here is my setup and situation:
    I am running an iMac with a 2.16 intel core 2 duo processor, 3 GB memory, and running OS X version 10.6.4. I am currently using versions cs3 and cs4 of Photoshop, but plan to upgrade to cs5 soon.
    The problem I am having is when running Photoshop, my computer becomes very slow. After reading about possible reasons, I came across a couple of sources (including Adobe themeselves) mentioning that the scratch disc should be a designated drive seperate from the drive containing the operating system. Since I am using an iMac that only allows for one internal drive, my only apparent option seems to be an external drive.
    Many people say don't use an external drive, but if you are going to; use an eSATA or firewire. The imac does have firewire 800 capabilities. Should I consider this?
    Now I'm wondering if it's a bad idea to purchase a macbook for my next computer (what I wanted to do) because it will also only have one drive, not allowing for a seperate drive for the scratch disc. Any thoughts? I've read around the net but haven't found any definitive answers.

    Designer,
    Photoshop benefits greatly from having a scratch disk on a separate physical drive, not on the boot disk or on another partition of the boot disk. It's almost not worth connecting via Firewire 400 because the transfer limitations don't allow much performance improvement. But using a Firewire 800 connection gives excellent performance.
    Running Photoshop on a one-drive machine is a little frustrating due to the performance hit without the separate scratch drive.
    Rich

  • MDX Query using BottomCount to limit Median calculation returns null

    I'm building a new cube that includes some person age values that aren't useful when summed, but are
    useful when the median is determined. The measure group that contains the measure for the age has a 1-1 relationship with a dimension in the cube because both use the same table as the source. This is important because I use the key attribute of the dimension
    as the set expression in the Median function to prevent any summation before the median is found. Here is the code for the original median calculation:
    MEMBER Measures.[Median Age] AS
    MEDIAN(
    [Placement Dimension].[Id Removal Episode Fact].Members,
    [Measures].[Age At Removal Months]
    This median naturally represents the half-way point in the series of values. My analysts have also requested
    median-type values at the quarter and three-quarter points in the same series. I've been able to accomplish this for the three-quarter point by nesting the TopCount function in the set expression of the Median function to limit the set to the last half of
    the records and then find the median point like this:
    MEMBER Measures.[75th Percentile] AS
    MEDIAN(
    TOPCOUNT(
    [Placement Dimension].[Id Removal Episode Fact].MEMBERS
    ,Measures.[Episode Count] / 2
    ,Measures.[Age At Removal Months]
    ,Measures.[Age At Removal Months]
    However, my attempt to use the BottomCount function in the same way as TopCount to find the quarter point
    in the whole data set by limiting the calculation's set to the first half of the data always returns null. Here is how I've formed the code:
    MEMBER Measures.[25th Percentile] AS
    MEDIAN(
    BOTTOMCOUNT(
    [Placement Dimension].[Id Removal Episode Fact].MEMBERS
    ,Measures.[Episode Count] / 2
    ,Measures.[Age At Removal Months]
    ,Measures.[Age At Removal Months]
    And here is the query that returns the values:
    SELECT
    Measures.[Episode Count]
    ,Measures.[Median Age]
    ,Measures.[25th Percentile]
    ,Measures.[75th Percentile]
    } ON 0
    ,[Date Begin].[Calendar Hierarchy].Year.&[2011]:[Date Begin].[Calendar Hierarchy].Year.&[2014] ON 1
    FROM [POC Cube]
    WHERE
    [Age at Removal Mos].[Age in Years List].[Age Year].&[0]:[Age at Removal Mos].[Age in Years List].[Age Year].&[5]
    I don't know why the end result is always null. I don't have any null values in the data for this measure, and I know what values I should be seeing because I've found the median records manually in results from a SQL Server query. I've tried using TopCount
    and multiplying Measures.[Age At Removal Months] in the TopCount function by -1 to workaround the descending sort, but I still get nulls. I've also tried separating these queries out so the quarter point and three-quarter point calculations aren't run together,
    but I still get nulls for the quarter point calculation.
    I'm open to any help fixing this situation by modifying my current code or by using alternate methods, but the end result has to be dynamic enough to be used as a calculation in the cube. Thanks!

    The links might helps.
    http://technet.microsoft.com/en-us/library/ms144864.aspx
    http://www.mssqltips.com/sqlservertip/3034/sql-server-analysis-services-ssas-2012-top-and-bottom-functions/
    http://www.sqlservercentral.com/blogs/bradleyschacht/2012/03/12/mdx-functions-bottomcount/

  • STATSPACK question using spauto.sql

    Using spauto.sql takes a snapshot of the database every hour, which is exactly what i want , but the question is when i run spreport, and trying to compare performance e.g ( 5.00p.m and 7.00p.m) how do go about it.

    Hi ,
    Following query will give you the snapshot id 's along with timings .
    select name,snap_id,to_char(snap_time,'mm/dd/yyyy hh24:mi:ss') from stats$snapshot,v$database.
    Provide start and end Id's to the spreport.sql .

Maybe you are looking for