如何解决如何在行的mdx查询中应用IIF条件
| 我的数据如下所示:> 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
因此,我需要用“审计总计”更改行标题“审计总计”。审核总数行是修订名称。如何在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条件,因此如果我得到rows = \“ Audit Total \”,则将其替换为\“ Audit Totals \”。
解决方法
一种不太好用的解决方案是:
StrToSet(
Replace(
SetToStr(...[Discipline].AllMembers ),\'[Audit Total]\',\'[Audit Totals]\' ),CONSTRAINED)
您还可以从列表{}中删除一个元素-您的成员,然后添加新的元素。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。