Page 1 of 1

MDX subset based on element from alternate hierarchy

Posted: Tue Feb 15, 2022 6:49 pm
by rameez
Hi,
I am trying to achieve functionality in PAW view where I have a dimension with default hierarchy and a selector dropdown from the same dimension but different hierarchy. I want to make the view dynamic in a way that when a user makes a selection in the drop down, the view displays only those members that belong to the selection.

Here is an example:
I have a Product dimension which has which has default hierarchy defined as:
Total Product
--Prod1
--Prod2
--Prod3 and so on

Alternate hierarchy Category has a structure:
Total category
--Cat1
----Prod1
----Prod3
--Cat2
----Prod2

I want to to display Prod1, and Prod3 when the user selects Cat1 in the dropdown and display Prod2 when the user selects Cat2.

Thanks for any feedback.

Re: MDX subset based on element from alternate hierarchy

Posted: Wed Feb 16, 2022 7:47 am
by Wim Gielis
Hello,

Try the following. Bring the other hierarchy in the titles section of the view. Use an MDX statement to ge the level 0 descendants of the CurrentMember of the second hierarchy but applied to the elements of the first hierarchy (that will be tricky if not all elements exist in both but you can try - untested).

Alternatively, use a static subset in the first hierarchy but update it with a small TI process. Also untested 😉

Re: MDX subset based on element from alternate hierarchy

Posted: Wed Feb 16, 2022 8:07 am
by lotsaram
I don't understand why you don't just already have the alternate hierarchy on the rows?

Re: MDX subset based on element from alternate hierarchy

Posted: Wed Feb 16, 2022 8:35 am
by Wim Gielis
lotsaram wrote: ↑Wed Feb 16, 2022 8:07 am I don't understand why you don't just already have the alternate hierarchy on the rows?
Indeed, very small difference and certainly not worth the extra effort.