MDX member value <> string
can please me syntax building set member not equal value?
for example:
nonempty([customer].[phone].[phone].members,
([measures].[internet order count],
[promotion].[promotion].&[2],
)
)
in adventureworks give me list of phone numbers have promotion code of 2.
i list promotion code not 2.
i know simple can't find way in mdx.
please if can.
thanks
the issue logic finds phone numbers have data promotion other promo 2, rather than phone numbers no data promo 2, (i think) want. try version of query, removes phone numbers with data promo 2 - remaining phone numbers have no data promo 2:
with
set cpn asexcept
([customer].[phone].[phone].members,nonempty
(
[customer].[phone].[phone].
members,{ [promotion].[promotion].&[2] } *
{ [measures].[internet order count] }
))
select
non empty { [measures].[internet order count] }on
columns,non
empty { ([delivery date].[date].[date].allmembers *cpn *
[promotion].[promotion].[promotion].
allmembers ) }on
rows from(
select ( { [promotion].[promotion].[all promotions] } )on
columns from(
select ( { [product].[category].&[1], [product].[category].&[3] } )on
columns from(
select ( { [delivery date].[date].&[986] :[delivery date].[date].&[989] } )
on
columns from(
select ( { [date].[fiscal year].&[2004] } )on
columns from [adventure works]))))
SQL Server > SQL Server Analysis Services
Comments
Post a Comment