【发布时间】:2015-08-20 06:27:30
【问题描述】:
MDX查询查找工资超过5000的员工
select
{
[Measures].[Total Employee],
[Measures].[Total Salary]
} on columns,
NON EMPTY
{
(
[Department].[All Department],
[Position].[All Position],
[Employee].[All Employee])
} on rows
from Salary
where
[Measures].[Total Salary]>5000
我的架构
<Schema name="Foodmart">
<Cube name="Salary" visible="true" cache="true" enabled="true">
<Table name="employee" alias="">
</Table>
<Dimension type="StandardDimension" visible="true" foreignKey="department_id" name="Department">
<Hierarchy name="All Department" visible="true" hasAll="true" allMemberName="All Department" primaryKey="department_id" primaryKeyTable="department">
<Table name="department">
</Table>
<Level name="Dept" visible="true" column="department_description" uniqueMembers="true">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" visible="true" foreignKey="position_id" name="Position">
<Hierarchy name="All Position" visible="false" hasAll="true" allMemberName="All Position" primaryKey="position_id" primaryKeyTable="position">
<Table name="position">
</Table>
<Level name="position" visible="true" table="position" column="position_title" uniqueMembers="false">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" visible="true" name="Employee">
<Hierarchy name="All Employee" visible="true" hasAll="true" allMemberName="All Employee">
<Table name="employee" alias="">
</Table>
<Level name="New Level 0" visible="true" column="full_name" uniqueMembers="false">
</Level>
</Hierarchy>
</Dimension>
<Measure name="Total Salary" column="salary" aggregator="sum" visible="true">
</Measure>
<Measure name="Total Employee" column="employee_id" aggregator="distinct-count" visible="true">
</Measure>
</Cube>
</Schema>
【问题讨论】:
-
请帮助任何人......
-
即使 sub-select(你称之为 subquery)在 Mondrian 中不起作用,你也有 2 个完全有效的解决方案。有什么问题?