INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

filtering using strtoset

filtering using strtoset

(OP)
Hi,

i have the following MDX query that uses parameters from an SSRS report to produce a result set:

WITH MEMBER PREM AS
StrToMember("[Measures].[" + @PremiumType+ " Premium]")
SELECT NON EMPTY
{PREM}
ON COLUMNS,
NONEMPTY
(Filter({ ([Prospect Client].[Account Number].[Account Number].ALLMEMBERS *
[Prospect Client].[Account Name].[Account Name].ALLMEMBERS *
[Prospect Client].[Division].[Division].ALLMEMBERS *
[Prospect Client].[Department].[Department].ALLMEMBERS *
[Prospect Client].[Section].[Section].ALLMEMBERS *
[Broker].[Account Direct Broker Code Previous].[Account Direct Broker Code Previous].ALLMEMBERS *
[Broker].[Account Direct Broker Code].[Account Direct Broker Code].ALLMEMBERS *
[Broker].[Account Broker Name Previous - Big 6].[Account Broker Name Previous - Big 6].ALLMEMBERS *
[Broker].[Account Broker Name - Big 6].[Account Broker Name - Big 6].ALLMEMBERS)}
,[Broker].[Account Broker Name - Big 6].CurrentMember.name <> [Broker].[Account Broker Name Previous - Big 6].CurrentMember.name
AND ([Broker].[Account Broker Name Previous - Big 6].Members = "Marsh" OR [Broker].[Account Broker Name - Big 6].CurrentMember.name = "Marsh")))
ON ROWS
FROM ( SELECT ( - { [Broker].[Account Broker Name Previous - Big 6].&[] } )
ON COLUMNS
FROM ( SELECT ( STRTOSET(@Operations, CONSTRAINED) )
ON COLUMNS
FROM ( SELECT( STRTOSET(@Division, CONSTRAINED) )
ON COLUMNS
FROM ( SELECT ( STRTOSET(@DateQuarter, CONSTRAINED) )
ON COLUMNS
FROM ( SELECT ( STRTOSET(@ProductLineGroup, CONSTRAINED) )
ON COLUMNS
FROM [Broker Premium])))))

the query gives me what I need, however, in the filter clause there is an OR statement that checks if the value of either the 'Account Broker Name Previous - Big 6' or the 'Account Broker Name - Big 6' = "Marsh". Instead of hard coding the value, i want to check a multi-valued parameter that will store the names pf the brokers. I need to somehow replace the OR statement to filter the result set based on what is coming in from the parameter to see if either field has the value(s) from the parameter.

so i basically need to replace the filter clause like this:

[Broker].[Account Broker Name Previous - Big 6].Members = STRTOSET(@Broker) OR [Broker].[Account Broker Name - Big 6].CurrentMember.name = STRTOSET(@Broker)

can this be done using MDX?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close