Query on MDX SCOPE

Hi All,
Greetings..!!
Requesting your help on below :
I am analyzing the script at one of the project , it is similar to below : 
SCOPE
[Geography].[City].[All Geographies],
[Date].[Calendar].[Calendar Year]
THIS = ([Measures].[Internet Sales Amount],
        [Product].[Product Categories].[Category]
END SCOPE;
Then, i am querying to check the result as below :
Select 
   [Measures].[Internet Sales Amount]
} on 0,
([Geography].[City].[All Geographies],
    [Date].[Calendar].[Calendar Year]
} on 1
From
[Adventure Works]
Giving the Error as : 
CellOrdinal 0
VALUE #Error The  function expects a string or numeric expression for the  argument. A tuple set expression was used.
FORMATTED_VALUE #Error The  function expects a string or numeric expression for the  argument. A tuple set expression was used.
Screenshot:
tried with different measures...
How to test the scope condition. Please help on this .
Thanks and Regards,
Mahesh
Mahesh Alam

hi Mahesh,
You specified a level in the scope statement THIS:
[Product].[Product Categories].[Category]     ??
wich is not a  "cube coordinate"
If you complete it, let's say only the bikes, it will work:
SCOPE ( 
  [Geography].[City].[All Geographies], 
  [Date].[Calendar].[Calendar Year] ); 
  THIS = ([Measures].[Internet Sales Amount], 
  [Product].[Product Categories].[Category].&[1] ); 
END SCOPE 
Philip,

Similar Messages

  • MDX SCOPE Clarification

    Hi All,
    I Have applied scope for the Product category,Region,Reseller Measure ,as below:
    SCOPE
    [Geography].[Country].&[Australia],
    [Product].[Category].[Category]
    ,[Measures].[Reseller Tax Amount]
    GO
    This = [Measures].[Internet Tax Amount];
    GO
    END SCOPE;
    Select
    [Measures].[Reseller Tax Amount],[Measures].[Internet Tax Amount]
    } ON 0,
    ([Product].[Category].&[1],[Geography].[Country].&[Australia])
    } ON 1
    From
    [Adventure Works]
    The above query is passed the above scope , it is giving the result..
    Again , tested by adding date measure 
    Select
    [Measures].[Reseller Tax Amount],[Measures].[Internet Tax Amount]
    } ON 0,
    ([Product].[Category].&[1],[Geography].[Country].&[Australia],[Date].[Calendar Year].&[2005])
    } ON 1
    From
    [Adventure Works]
    It is also giving the result as earlier....
    Logically , it is correct .
    But as per the scope statement , it violates ....
    so , it should show the original select statement result ...
    Could you please clarify this ..
    Thanks,
    Mahesh
    Mahesh Alam

    Hi Mahesh,
    Your Scope is defined for the combination of objects (SubCube) [Geography].[Country].&[Australia], [Product].[Category].[Category],
    [Measures].[Reseller Tax Amount]
    So whenever these three object take part in a query either along with other objects or not, the defined scope becomes active.
    Therefore in you case the second query would also fetch [Internet Tax Amount]
    in place of
    [Reseller Tax Amount] for the year 2005.
    Basically Scope becomes active whenever the combination of objects defined in Scope takes part in MDX query irrespective of other objects involved in the query. So whenever additional objects along with the objects defined in scope take part in query, the
    additional object is queried on the subcube created by Scope.
    Saurabh Kamath

  • Crystal Report on BW BEx Query via MDX in SAP Portal

    Hi!
    We need to display a CR in the Portal. The CR is based on a MDx BW Query. To create and display the report is no problem. Even saving back to BW is working fine.
    But how do we get this CR displayed in the EP?
    Thanks in advance
    Jörn

    Hi,
    Should only the BO SAP Integration Kit iViews / URL iViews be used and are the Crystal Report iViews (http://help.sap.com/saphelp_nw04/helpdata/en/36/d4a94076b63713e10000000a155106/frameset.htm) obsolete?
    Yes as the Crystal Report iView are based on an older version
    If we export the Crystal reports to SAP BW, is it possible to call them with BEx iViews like the xCelsius reports? (Like with DASHBOARD=<report name> for xCelsius)
    From where can we get the Crystal Report ID, if we export them to SAP BW?
    You should use the BusinessObjects Integration Kit iView template for Crystal REports and the ID can be retrieved from the CMC
    Ingo

  • Cannot connect to BW query and MDX error

    i have few issue encountered on webi connected to SAP BI 7 and BW 3.x
    SAPBI7
    1)while select the cube/multiprovider on universe connection, i cannot see all the query availbale at BW, only show some query. but i can see all cube/multiprovider. whey?
    2)i hit database error when generate webi report from BI7.0 the error msg is "A database error occured the database text is : The MDX Querry SELECT {.....". it working fine when connect to BW 3.x.
    SAPBW 3.x
    1) i cannot see query from univese connection when connect BW 3.x, only can see cube/multiprovider. i using java connect
    SAP Java Connector 2.1.8 , SAP edge 3.1
    Please help .. thanks

    Hi,
    1)while select the cube/multiprovider on universe connection, i cannot see all the query availbale at BW, only show some query. but i can see all cube/multiprovider. whey?
    >> BW queries need to be released for external access in the Query Designer
    2)i hit database error when generate webi report from BI7.0 the error msg is "A database error occured the database text is : The MDX Querry SELECT {.....". it working fine when connect to BW 3.x.
    >>> Does the actual query that you were using work in transaction RSRT.
    SAPBW 3.x
    1) i cannot see query from univese connection when connect BW 3.x, only can see cube/multiprovider. i using java connect
    SAP Java Connector 2.1.8 , SAP edge 3.1
    >>> see above on item #1.
    Ingo

  • Build Query with MDX for BW cube

    Hi All ,
    I need to build a MDX query
    I need to pass range of values from select options in the where clause .
    thanks in advance for Any inputs .
    Vinay Kolla

    Classic Crystal Reports and Classic SAP connectivity questions
    Classic Crystal Reports and Classic SAP connectivity questions

  • Sorting query in MDX query filter in PPS

    Hi,
    Iam new to the PPS world. Iam using MDX query filter and I need to create a filter field using the [BusinessLine].[Department] dimension. I need to sort the display value of Department in descending order in the filter and Iam using the following
    Order([BusinessLine].[Department],[BusinessLine].[Department],DESC) in the query window while creating the filter. But Iam getting 'No value found'! result.
    Please let me know Iam doing any mistake in this

    Hi Umair,
    Thanks for the reply
    The department here is Attribute and BusinessLine is dimension in my cube.For other requirement(the department has to be sorted based on the creation date attribute) purpose I have kept department as composite key with other attribute called CREATE_DATE
    with named column as department
    Order (
    [BuisnessLine].[Department].[DEPARTMENT],
    [BusinessLine].[CREATE_DATE].Properties("Name"),
    DESC
    Iam just replacing the above query as it is in the Enter MDX formul? page
    Is it correct.

  • Query Close and Scope

    Hi,
    Can I assume that a local query object will release its resources if it
    goes
    out of scope without an explicit query.closeAll or is an explicit closeAll
    always required to release resources and memory?
    I'm using an old Kodo at present (2.4.2 with fixed serp.jar).
    If an explicit closeAll is required what would the design pattern be for a
    method
    that carries out a query and wants to return the collection of found
    objects. Obviously,
    a closeAll will render the collection useless. Surely one doesn't have to
    copy all the
    object references to a new collection, do a closeAll of the query and return
    the new collection?
    Thanks for any advice,
    Clive Cox

    You either have to copy the collection or not close the results. DB
    resources are always reclaimed when the result collection is garbage
    collected. Or if you set com.solarmetric.kodo.DefaultFetchThreshold to
    -1, you can be sure that results are released immediately after
    execution (the entire result set is eagerly loaded). This is the best
    solution if you're going to be iterating the entire collection anyway.

  • Please help me getting this query in MDX

    Select CASE WHEN DSL.Latest_Label IS NULL THEN DS.[Label] ELSE DSL.Latest_Label END AS Label From Dim_Label AS DS LEFT OUTER JOIN
    (Select Idx,GRP_Idx,Max(Latest_Label) Latest_Label,MAX(Date_ID) Date_ID from [Dim_Label_Change] DSL te_Day = DSL.Date_Effective Where (Date_Id <= 333  ) Group by idx,GRP_Idx)
    DSL ON DS.Idx = DSL.Idx
    Thanks in Advance for the help

    My Cube has Dimensions, Fact tables and Measures , and Dimension table consists of Main and History table(Type 2 Slowly Changing Dimension).
    I would like to display the History(Latest_Label) Name based on  the date selected on SSRS Report.
    Hi SKPSR,
    According to your description, you need to get the latest history name based on a date that selected by use in SSRS report, right?
    In SSAS, we can use the LastNonEmpty function or Tail function to get the last member from a set. We cannot give you the detail MDX query based on the limited information, you can refer to the links below to see the details.
    http://msdn.microsoft.com/en-us/library/ms146056.aspx
    http://thinknook.com/ssas-lastnonempty-aggregation-function-2012-08-18/
    If the issue persists, please provide us more information about your cube structure, so that we can make further analysis.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Convert a query to MDX

    Hi,
    I created a query in Business query desginer and i want to convert into MDX. Please update me for this.
    Thanks
    Ankur Kuchhal

    Hi,
    You can create a MDX query in MDXTEST t.code and you can also test the same.
    Cheers,
    Malli.

  • SAP BW BEx query - WEBi MDX query

    Hi Experts, have we had some discussion on this?
    Does MDX query send by WEBi report to BW use the same program to extract data from BW database?
    One of the option for WEBi report source of data is to build Universe on top of BEx query. Could you share how this process actually happen.
    I think
    - WEBi query will pass parameters that is relevant for BEx query filter of the universe
    - the BEx query will then extract the data (following normal process if we run BEx query independently)
    - if WEBi has further filtering, it will then get the BEx result above and filter it further ..??
    So, how is MDX query come into the picture?
    Or is it:
    - WEBi query and the BEx query will determine what MDX query will be generated, and this MDX query will then fetch the data.
    But why BEx query extract data faster then MDX query?
    Sorry, i am new to this. hope someone could share some light here. In the meantime i continue to real those documentation and try to get some more ideas of what is actually happening.
    Thanks.

    Hi Thanks a lot for pointing this out.
    Did i understand it correctly that BEx query is using a different set of program (platform) to retrieve data compare to MDX query, and not MDX uses those program that is used by BEx to retrieve data from BW database and have extra steps on top of that?
    Can anyone share what is actually happen WEBi MDX query is executed (how the database is hit with SQL, and what are the tools to evaluate the efficiency of the WEBi (or the used BEx). As for BEx we have RSRT to analyze it right.
    And even to test the MDX query using MDXTEST and try to get the data from WEBi report, i found WEBi report still take considerably a lot longer. Why is this so? just because BO is a different system then BW?
    And as it's shared the BO 4.0 is using the same platform as BEx to retrieve data from BW database, does this mean we don't need to care about MDX usage in BW anymore as far as BO data extraction concern?
    Thank you very much.

  • Is it possible to implement Recursive CTE query in MDX to Cube dataset?

    I have data with hierarchical relationship like this:
    Release -> Features -> PBI/Bugs -> Tasks/Test Case. I have two datasets Work Item and Work Item Linked to get this hierarchical information.
    The data looks like this:
    Something like if I pass a Release ID, I need to get all the children and sub-children also. Basically a report like this:
    I did this by implementing a recursive CTE query with warehouse tables. But it takes more time to load. SO trying to find the possibility using MDX and querying the cube datasets

    Hello,
    There is nothing stopping you from querying the cache to see what is in it. However, this will only take into account items that are already in the cache. If you need a query to return items that are potentially not in the cache, you need to query the database, have the query return keys, and then request those keys through Coherence - which will in turn pull the items from the database as needed.
    Regards,
    -Dave

  • Restricted/Calculated Key Figures in Query vs MDX?

    Hello All,
    We are embarking on our first project utilizing SAP BW as the Data Warehouse and Web Intelligence as the presentation tool.
    We plan on creating the universes on BW Queries.
    What are the pros and cons of using Restricted and Calculated Key Figures in the query versus creating them in the Universe?  Also from a performance impact point of view if there is any?
    Best Regards,
    Dan Krieg

    Hi Dan,
    I would suppose that there is no big influence on performance. If the calculation for the calculated key figures are very complex I would propose to calculate them on query level. So its easier to use them also in other environments.
    Please take into consideration that OLAP universes are not supported in Crystal Reports. More information you find in the thread [OLAP universes and Crystal Reports|OLAP universes and Crystal Reports;.
    Regards,
    Sebastian

  • Query on MDX used in EVEXP

    Hi All,
    I am using MDX for filtering values in EXEXP formula. In EVEXP formula's last field of Filter, I am giving the following MDX:
    -->  ENTITY .currentmember.properties("Dropdown") ="Y"
    I am getting the filtered values of Dropdown property having values Y. But I want to have members having property value of Y as well as N. What MDX sshould I write for the same?

    Hi,
    You can use
    ENTITY.currentmember.properties("Dropdown") ="Y" and ENTITY.currentmember.properties("Dropdown") ="N"
    Hope this helps.

  • Query regarding the scope of a page

    hi all
    i have problem with scopes of the pages.I have a data entry page where i have a button to add address.When i click on address button it will go to another page where i can add the address.After adding it returns to the entry page.The problem is that when it returns all the data entry feilds are cleared.Is there any way to restore the states of the textfields and other componenets.Please help me
    Thanks in advance
    Sree

    Yes there is. Store the values in managed bean properties and, in the prerender method, set the component values to the values from the managed bean properties.
    For more information, see:
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/jscintro.html#08
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/scopes.html
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/data_sharing_twopages.html

  • Fuzzy query in MDX ?

    SELECT * 
    FROM SYSTEMRESTRICTSCHEMA($system.discover_partition_stat
            ,DATABASE_NAME = 'hello world'
            ,CUBE_NAME = 'hello world'
            ,MEASURE_GROUP_NAME = 'Views'
            ,PARTITION_NAME='20120101'
    How to modify above query to achieve:partition_name like '%2012%'
    Thanks

    Hi RedJack,
    From your description, you want to use the fuzzy query in the DMV query, right? The DMV query syntax is based on the SELECT (DMX) statement. Although DMV query syntax is based on a SQL SELECT statement, it does not support the full syntax of a SELECT statement.
    Notably, JOIN, GROUP BY, LIKE, CAST, and CONVERT are not supported.
    Reference:
    Use Dynamic Management Views (DMVs) to Monitor Analysis Services
    SSAS
    2008 RC0 – New function SYSTEMRESTRICTSCHEMA for restricted schema rowsets – DMVs
    Regards,
    Charlie Liao
    TechNet Community Support

Maybe you are looking for

  • Use 3 internal table in GUI_Download

    Hello expert, i have 3 internal table: gt_header, gt_body and gt_footer. how can i used all 3 in gui_download fm. here is my sample code:   CALL FUNCTION 'GUI_DOWNLOAD'     EXPORTING       filename              = gv_file_name       filetype          

  • Dunning Letter Print layout

    hi experts i am interested in editing the Printlayout of the Dunning Letter(under Sales-wizard reminder) i actually want to ad in a repeating area the Doc Sum which is the Total Amount but the problem i found is that i cannot call in a text field the

  • Customer payment  against invoices

    Dear friends . Please suggest me that is there any report in FI for customer payment against invoices Customer No     Name     Company Code     Fiscal Year     Invoice No     Invoce Posting Date     Invoice Amount     DZDoc No         DZ Amount     D

  • Open/ Save files in PS CC

    Hi Photoshop is not able to open files, and not able to save files either. It keeps reverting back with a error message: Not possible due to a program error. Im running Lr Ps and Bridge on a brand new MacPro. What is wrong?

  • TS3694 I am getting error code 3194 when i try to update my iphone 4S to IOS 6.1.3. How can i resolve this

    I am getting error code 3194 when i try to update my iphone 4S to IOS 6.1.3. How can i resolve this?