我是Mondrian和OLAP的新人。我尝试更改列的名称。我还没改变。这是我的疑问:
WITH
SET ResponsibleSet AS {[Responsible].[Name].Members
MEMBER [Responsible].[RowSum] AS AGGREGATE(ResponsibleSet)
SELECT FILTER({[Balance].[Currency].Members}, not [Balance].[Currency].currentMember.Properties('Deleted')) ON COLUMNS,
NON EMPTY {ResponsibleSet, [Responsible].[RowSum]} ON ROWS FROM [Balance Cube] WHERE (Measures.[Sum])
结果:
| | EXPENSE | INCOME |
| | false | false |
| | EUR | TRY | USD | EUR | TRY | USD |
+---------+---------+---------+---------+--------+--------+--------+
| Joe | 25 | 97 | 10 | 15 | 173 | 18 |
| | 25 | 97 | 10 | 15 | 173 | 18 |
例如:我想将“EUR”列更改为“EURO”。如何使用mdx查询更改此示例的重命名? 此外,最后一行没有名称。如何在此行中添加名称?
感谢。
答案 0 :(得分:1)
不太确定蒙德里安 - 但在(标准)MS mdx你可以这样做:
我假设您的多维数据集中的全名是[Balance].[Currency].[Currency].[Eur]
- 您需要根据需要进行替换:
WITH
SET ResponsibleSet AS
{[Responsible].[Name].MEMBERS}
MEMBER [Responsible].[RowSum] AS
Aggregate(ResponsibleSet)
MEMBER [Balance].[Currency].[All].[Euro] AS
[Balance].[Currency].[Currency].[Eur]
SELECT
{
Except
(
Filter
(
{[Balance].[Currency].MEMBERS}
,(NOT
[Balance].[Currency].CurrentMember.Properties('Deleted'))
)
,[Balance].[Currency].[Currency].[Eur]
)
,[Balance].[Currency].[Currency].[Euro]
} ON COLUMNS
,NON EMPTY
{
ResponsibleSet
,[Responsible].[RowSum]
} ON ROWS
FROM [Balance Cube]
WHERE
Measures.[Sum];
答案 1 :(得分:0)
您可以通过两种方式实现:
当然是1& 2您需要使用货币名称
扩展货币维度的源表