MDX Filter based on a different dimension attr

Post Reply
RCO
Posts: 40
Joined: Mon Sep 09, 2013 7:16 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2013

MDX Filter based on a different dimension attr

Post by RCO »

Hi all,

I am unsure if what I am trying to do here is actually possible or if anyone has come across a similar requirement.

I have 2 different dims 1-Account and 2-Statistic Measure.
The idea is to have a single attribute (in the account dimension) which in this case is called "ST PL_R12" so when a user selects a specific account in a websheet the report will return the corresponding statistic measure.
Account Dim example as follows:
Capture1.JPG
Capture1.JPG (28.6 KiB) Viewed 2728 times
My current MDX syntax in the Statistic Measure dim is:
Capture2.JPG
Capture2.JPG (25.34 KiB) Viewed 2728 times
However as it can be seen above, it only returns a single element.

I'm expecting something more like below
Capture3.JPG
Capture3.JPG (14.33 KiB) Viewed 2728 times
I have to admit I'm not an expert when it comes to MDX so if there is anyone out there who can shade a light that would be great :D !
lotsaram
MVP
Posts: 3702
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: MDX Filter based on a different dimension attr

Post by lotsaram »

This has come up before if you search. Doing a filter in this way in MDX to return a subset by referencing member properties of a different dimension only works if the other dimension is a title element, otherwise there is no context. The foreign dimension that is being referenced must have a static value for the purposes of the query. It doesn't work if both dimensions are on rows.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Post Reply