Hi everyone,
i have a problem and maybe you guys could help me
Ich habe a Cube with 4 Dimensions. And now I want a list of Elements in DIM1 which include a String Value in the Cube.
for example:
This works, but i have to write down all Elements. But i want, for example, that the MDX includes all Elements in DIM3 and DIM4 not only the Element3 and Element4.
Because it is a String i am searching for, i can't select the TopElement of DIM3 and DIM4
{FILTER( { TM1FILTERBYLEVEL( {TM1SUBSETALL( [DIM1] )}, 0)}, [Cubename].([DIM2].[Element2],[DIM3].[Element3], [DIM4].[Element4] )="hallo")}
Memo
MDX by String Cube Value
- paulsimon
- MVP
- Posts: 808
- Joined: Sat Sep 03, 2011 11:10 pm
- OLAP Product: TM1
- Version: PA 2.0.5
- Excel Version: 2016
- Contact:
Re: MDX by String Cube Value
Hi
Not sure if this is what you want but in TM1 instead of putting [Dim].[Element] you can put [Dim].[Subset] so if you define a subset with all base level elements for each dim and specify that, it may give you what you are after
Regards
Paul
Not sure if this is what you want but in TM1 instead of putting [Dim].[Element] you can put [Dim].[Subset] so if you define a subset with all base level elements for each dim and specify that, it may give you what you are after
Regards
Paul
-
- Posts: 26
- Joined: Thu Nov 13, 2014 8:42 am
- OLAP Product: IBM Cognos TM1
- Version: 10.2.2
- Excel Version: Excel 2010
Re: MDX by String Cube Value
Hi,
thanks for that. I will try it next week.
I read, i have to list all dimensions in the MDX Statement. If i don't list one, MDX picks up the Element with the Index 1. Either way it is not i want to do. But i try that with the Subsets.
Thanks
thanks for that. I will try it next week.
I read, i have to list all dimensions in the MDX Statement. If i don't list one, MDX picks up the Element with the Index 1. Either way it is not i want to do. But i try that with the Subsets.
Thanks
-
- MVP
- Posts: 2832
- Joined: Tue Feb 16, 2010 2:39 pm
- OLAP Product: TM1, Palo
- Version: Beginning of time thru 10.2
- Excel Version: 2003-2007-2010-2013
- Location: Atlanta, GA
- Contact:
Re: MDX by String Cube Value
If you remember that values are stored in cubes at the intersection of a single element in each dimension then you'll understand why you have to provide TM1 with the necessary information with which to retrieve what you want. Writing an MDX query to pull back an element from a dimension, based on values from a cube, without providing an element from all the dimensions in the cube is like expecting a DBRW formula to work when missing some parameters. TM1 has to know where to look in the cube, If you don't tell it then the query won't work.
The only time a cube value filtered MDX subset query will work without specifically naming an element from all the dimensions is one used as part of a cube view, where the missing elements are in dimensions that are part of that cube and those dimensions are part of the title section of the view. In this case TM1 will automatically plug in the missing elements in the MDX query from the title section of your cube view. Keep in mind this subset, when looked at through the subset editor, will always evaluate to empty. It will only work in a cube view.
The only time a cube value filtered MDX subset query will work without specifically naming an element from all the dimensions is one used as part of a cube view, where the missing elements are in dimensions that are part of that cube and those dimensions are part of the title section of the view. In this case TM1 will automatically plug in the missing elements in the MDX query from the title section of your cube view. Keep in mind this subset, when looked at through the subset editor, will always evaluate to empty. It will only work in a cube view.
-
- Site Admin
- Posts: 1454
- Joined: Wed May 28, 2008 9:09 am
Re: MDX by String Cube Value
@tomok, my belief is that if you specify a default member in (weirdly) }HierarchyProperties, you can issue an MDX query not mentioning that dimension and still get output. One of the MSAS concepts I think is good ( ). Having said that, my (next) belief is that this is only relevant to the frontends which issue MDX SELECT queries - ie not dynamic subsets.