Friday, March 23, 2012

How could I modify it as MDX Parameter?

Hi,
I have a MDX syntax as follow
select
[Measures].[Amount] on columns,
[XX03Buyer] on rows
from cubeef
where [XX01Product].[XX01Product].&[2212]
and want to change .&[2212] as Parameter,
that I can select Product code like 2200, 2211.
So, how should I do?
Thanks for any advice!
AngiSet up your parameter as you would normally then in the mdx change it to
="select" & "[Measures].[Amount] on columns, "
& "[XX03Buyer] on rows "
& "from cubeef "
& "where [XX01Product].[XX01Product].&["& Parameters!ProductID.Value &"]"
That should do it, as long as i got the syntax right. Problem with this is
that you can't test it unless you preview it. So if you want to get more
from you MDX suxh as more fields you need to take out all the quotes and &'s
and the = at the beginning. So my advice is save a copy of the MDX query
for a particular product so you can refresh your fields easily.
hope that helps
Greg
"Angi" <enchiw@.msn.com> wrote in message
news:%23pZmQPw9FHA.2644@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I have a MDX syntax as follow
> select
> [Measures].[Amount] on columns,
> [XX03Buyer] on rows
> from cubeef
> where [XX01Product].[XX01Product].&[2212]
> and want to change .&[2212] as Parameter,
> that I can select Product code like 2200, 2211.
> So, how should I do?
> Thanks for any advice!
> Angi
>sql

No comments:

Post a Comment