Hi
I am new to TM1 and I have run in to a problem. I need to filter a dimension using a MDX statement that is refering to a kind of controlcube that I created. That cube consists of two dimensions with consolidated elements with elements below (like a hierarchy). Everything works fine accept for the fact that I would like to have - NOT only current members (elements) but also the consolidated elements that these members belong to.
{FILTER(
TM1FILTERBYLEVEL(
{TM1SUBSETALL([Cost element Group])}
,0),
[CostBudg Controlcube].([CC_and_IO].CurrentMember)
>0
)}
I guess is that it has something to do with "ancestor" but I can not figure it out.How can I write that statement and include not only "CurrentMember" as it is right now, but also the level(s) above (which also has a value greater than zero because they are consolidated).
Please please help.
MDX filter subset
-
- 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 subset
What dimension are you creating the subset for, Cost element Group or CC_and_IO?
It looks like Cost element Group, in which case you can't use CurrentMember without context on CC_and_IO. That just won't work.
It looks like Cost element Group, in which case you can't use CurrentMember without context on CC_and_IO. That just won't work.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
-
- Posts: 19
- Joined: Tue Feb 17, 2015 1:01 pm
- OLAP Product: TM1
- Version: 10.1
- Excel Version: 2010
Re: MDX filter subset
Thank you lotsaram...
Your right, I am filtering the "Cost element Group" dimension. I am not sure what you mean with "you cant use CurrentMember"...
This MDX-function goes to the cube [CostBudg Controlcube] and looks for all Cost element Groups for a specific CostCenter (CC_and_IO) that has a value greater than zero in the intersection. It then returns all of them but on an elementlevel. I would like it to return all levels, in other Words:
Example:
CostCenter X has 5 Cost element Groups connected to it.
Element 1
Element 2
Element 3
Element 4
Element 5
But because of the fact that Element 1 lies below this consolidated element:
Group 1
Element 1
I would like my mdx not only to pick Element 1-5 but also Group 1. Is that not possible?
Your right, I am filtering the "Cost element Group" dimension. I am not sure what you mean with "you cant use CurrentMember"...
This MDX-function goes to the cube [CostBudg Controlcube] and looks for all Cost element Groups for a specific CostCenter (CC_and_IO) that has a value greater than zero in the intersection. It then returns all of them but on an elementlevel. I would like it to return all levels, in other Words:
Example:
CostCenter X has 5 Cost element Groups connected to it.
Element 1
Element 2
Element 3
Element 4
Element 5
But because of the fact that Element 1 lies below this consolidated element:
Group 1
Element 1
I would like my mdx not only to pick Element 1-5 but also Group 1. Is that not possible?
-
- Posts: 19
- Joined: Tue Feb 17, 2015 1:01 pm
- OLAP Product: TM1
- Version: 10.1
- Excel Version: 2010
Re: MDX filter subset
Here are the solution (eventhough it will not work for me):
{FILTER(
TM1FILTERBYLEVEL(
{TM1SUBSETALL([Cost element Group])}
,0,2,3,4,5,6),
[CostBudg Controlcube].([CC_and_IO].CurrentMember)
>0
)}
That brings all the levels. My problem is that I have the same element under different consolidated levels so my filter doesnt work anyway. No, this is not something that I have decieded....
{FILTER(
TM1FILTERBYLEVEL(
{TM1SUBSETALL([Cost element Group])}
,0,2,3,4,5,6),
[CostBudg Controlcube].([CC_and_IO].CurrentMember)
>0
)}
That brings all the levels. My problem is that I have the same element under different consolidated levels so my filter doesnt work anyway. No, this is not something that I have decieded....

Last edited by tobtm1 on Thu Apr 30, 2015 7:35 am, edited 1 time in total.