English 中文(简体)
How can I use an MDX Level property in the slicer?
原标题:

Suppose I have a [Sales] cube which has a [Store] level and a store has a "type" property. Which query should I use for showing the sum of sales for all the stores of type "Supermarket"? (e.g. You sold 6M $ in all stores of type "Supermarket")

问题回答

If you want to access member properties, you can use .properties("propertyname")

You would have to create a custom set which first filtered and then aggregated all the members of the [Store] level which matched the property value "Supermarket".

My MDX skills are a bit rusty...

WITH MEMBER [Stores].[SupermarketSweep] AS  Aggregate([Filter([Stores].[Store].members, [Stores].currentMember.properties("type") = "Supermarket")) 
SELECT {[Stores].[SupermarketSweep]} ON ROWS,
{[Measures].[Whatever]} ON COLUMNS
FROM [Sales]

If you wanted to use the "type" property in queries you would be better to make it a browseable attribute.





相关问题
When is data erased from the OLAP DB?

I am new to OLAP. I understand the table structure and ETL process. I don t understand when data is supposed to be deleted from the fact table. Say I m creating a reporting application for events. ...

IIS 6.0 Application Pool Identity Being Ignored

I am using IIS 6.0 on Windows 2003 in a workgroup, and have created a web which runs in its own pool to connect to a Sqlserver 2005 Analysis Services database using msmdpump.dll. I have set the pool ...

Any scalable OLAP database (web app scale)?

I have an application that requires analytics for different level of aggregation, and that s the OLAP workload. I want to update my database pretty frequently as well. e.g., here is what my update ...

MDX Calculated Member CrossJoin question

I have an MDX query with the following calculated member: with member [Measures].[BBOX] as Count( Filter( CrossJoin([Dim Response].[Response ID].Children, [Dim Question].[Question Text]....

trouble connecting Excel to Analysis Services server

We have an SSAS server with a cube deployed on a server over the WAN.. We are trying to connect to the cube from Excel on various client workstations. The server is not on a domain with the clients. ...

Cant connect to analysis services via excel

I have an analysis services cube in SQL server 2005 which I m connecting to via an excel front end. When I connect via one user its fine, but when I log on to the same machine as another user I get ...

Dimension Security in OLAP Cubes

I have defined dimension security in my OLAP cube by creating roles and assigning users to each roles. Each user in a role can only see the location they belong to. When I browse the cube using a ...

热门标签