开发者

how to apply IIF condition in mdx query in rows

开发者 https://www.devze.com 2023-03-09 10:31 出处:网络
my data are look like this: > Columns开发者_高级运维ABC > > RowsTotal Audit Complete Audit Not Complete Audit Total

my data are look like this:

> 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

so, i need to change the rows title Audit Total with Audit Totals. the audit total rows is fix name. how to write the condition in mdx query. my mdx query is :

> 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

i want to write some iif condtion in rows, so if i get rows="Audit Total" then it replace by "Audit Totals".


One not very elegant solution is something like :

StrToSet( 
   Replace( 
      SetToStr(...[Discipline].AllMembers )
   ,'[Audit Total]'
   ,'[Audit Totals]' )
,CONSTRAINED)

You can also remove one element from a list {} - your member, and add the new one.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号