我的数据如下所示:
> Columns A B C
>
> Rows Total Audit Complete Audit Not Complete Audit Total
> 0 1 2 3
> 2 3 4 9
> 4 4 4 12
所以,我需要用Audit Totals更改行标题Audit Total。审计总行是修订名称。如何在mdx查询中编写条件。我的mdx查询是:
> With Member [Measures].[NCs of New
> Audit] as [Measures].[N Cs Of New
> Audit]
>
> Member [Measures].[PNCs Of New Audit]
> as [Measures].[PN Cs Of New Audit]
>
> Member [Measures].[OFIs Of New Audit]
> as [Measures].[OF Is Of New Audit]
>
> Member [Measures].[Average NCs Of New
> Audit] as [Measures].[Average N Cs Of
> New Audit]
>
> Member [Measures].[Average OFIs Of New
> Audit] as [Measures].[Average OF Is Of
> New Audit]
>
>
>
> SELECT { [Measures].[Audit Closed],
> [Measures].[Audit Open],
> [Measures].[CS Of New Audit],
> [Measures].[NCs of New Audit],
> [Measures].[PNCs Of New Audit],
> [Measures].[OFIs Of New Audit],
> [Measures].[Average NCs Of New Audit],
> [Measures].[Average OFIs Of New Audit]
> } ON COLUMNS,
>
> {[Results By Functional
> Discipline].[Discipline].[Discipline].AllMembers
> } ON ROWS
>
> FROM [QualityMattersView] where
> (<<SD>>:<<ED>>,<<Title>>)
>
> CELL PROPERTIES VALUE,
> FORMATTED_VALUE, CELL_ORDINAL,
> FONT_FLAGS, FORE_COLOR, BACK_COLOR
我想在行中写一些iif condtion,所以如果我得到rows =“Audit Total”,那么它将替换为“Audit Totals”。
答案 0 :(得分:1)
一个不太优雅的解决方案是:
StrToSet(
Replace(
SetToStr(...[Discipline].AllMembers )
,'[Audit Total]'
,'[Audit Totals]' )
,CONSTRAINED)
您还可以从列表{}中删除一个元素 - 您的成员,然后添加新元素。