Subset based on values ( elements has the same name as values)

Post Reply
Daniel
Posts: 6
Joined: Mon Jul 11, 2016 11:23 pm
OLAP Product: cognos tm1
Version: 10.2.
Excel Version: 2013

Subset based on values ( elements has the same name as values)

Post by Daniel »

Hi All!

At the moment I have 2 cubes whish have few shared dimensions. However cube 1 has a dimension Type, while cube 2 has type as a value ( element "type" in metrics dimension ).In the metrics dimension of Cube 2 there are also information on how many pieaces of each type was sold.

The thing I am trying to do is to create a subset of types in dimension Type of Cube1, based on values of Cube 2, so I would have all types in the subset at least one pieace of which was sold.
I know how to work with some values based for elements, but how to build a subset that would have the same elements as values in another cube ?
{FILTER(
{TM1FILTERBYLEVEL( {TM1SUBSETALL( [Type] )}, 0)},
[Cube 2].([MetricsDimension].[Type]) = "?????????"
)}

Thank You all in advance!
Wim Gielis
MVP
Posts: 3240
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Subset based on values ( elements has the same name as values)

Post by Wim Gielis »

Hello,

Instead of "?????????" you could try:

[Type].CurrentMember.Name

But I would be surprised if it would work. In any case I would go for a solution with Turbo Integrator.

Wim
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
lotsaram
MVP
Posts: 3704
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Subset based on values ( elements has the same name as values)

Post by lotsaram »

Daniel wrote:Hi All!

At the moment I have 2 cubes whish have few shared dimensions. However cube 1 has a dimension Type, while cube 2 has type as a value ( element "type" in metrics dimension ).In the metrics dimension of Cube 2 there are also information on how many pieaces of each type was sold.

The thing I am trying to do is to create a subset of types in dimension Type of Cube1, based on values of Cube 2, so I would have all types in the subset at least one pieace of which was sold.
I know how to work with some values based for elements, but how to build a subset that would have the same elements as values in another cube ?
{FILTER(
{TM1FILTERBYLEVEL( {TM1SUBSETALL( [Type] )}, 0)},
[Cube 2].([MetricsDimension].[Type]) = "?????????"
)}

Thank You all in advance!
If you really want help on this please visit the RFA guidelines. You need to provide more information and formulate your question better if you are serious about getting assistance.

In theory it shouldn't be a problem to have a "Type A" subset defined as
{FILTER(
{TM1FILTERBYLEVEL( {TM1SUBSETALL( [Type] )}, 0)},
[Cube 2].([Dim1].[Total],[Dim2].[Total],[Dim3].[Total],[Dim1].[Total],...[MetricsDimension].[Type A]) = <> 0
)}
... but what are dims 1 to n?
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Wim Gielis
MVP
Posts: 3240
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Subset based on values ( elements has the same name as values)

Post by Wim Gielis »

lotsaram wrote:
Daniel wrote:Hi All!

At the moment I have 2 cubes whish have few shared dimensions. However cube 1 has a dimension Type, while cube 2 has type as a value ( element "type" in metrics dimension ).In the metrics dimension of Cube 2 there are also information on how many pieaces of each type was sold.

The thing I am trying to do is to create a subset of types in dimension Type of Cube1, based on values of Cube 2, so I would have all types in the subset at least one pieace of which was sold.
I know how to work with some values based for elements, but how to build a subset that would have the same elements as values in another cube ?
{FILTER(
{TM1FILTERBYLEVEL( {TM1SUBSETALL( [Type] )}, 0)},
[Cube 2].([MetricsDimension].[Type]) = "?????????"
)}

Thank You all in advance!
If you really want help on this please visit the RFA guidelines. You need to provide more information and formulate your question better if you are serious about getting assistance.

In theory it shouldn't be a problem to have a "Type A" subset defined as
{FILTER(
{TM1FILTERBYLEVEL( {TM1SUBSETALL( [Type] )}, 0)},
[Cube 2].([Dim1].[Total],[Dim2].[Total],[Dim3].[Total],[Dim1].[Total],...[MetricsDimension].[Type A]) = <> 0
)}
... but what are dims 1 to n?
Hi Lotsaram,

I agree with you on providing very little information.
But what I understood was that element names of the dimensoin Type are (String) inputs in a cube in which we need to filter.
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
lotsaram
MVP
Posts: 3704
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Subset based on values ( elements has the same name as values)

Post by lotsaram »

Wim Gielis wrote:Hi Lotsaram,

I agree with you on providing very little information.
But what I understood was that element names of the dimensoin Type are (String) inputs in a cube in which we need to filter.
I guess that underlines my point. The question isn't clear as my understanding from the following ...
Wim Gielis wrote:The thing I am trying to do is to create a subset of types in dimension Type of Cube1, based on values of Cube 2, so I would have all types in the subset at least one pieace of which was sold.
was ... where units of Type X are > 0.

Not something I think either of us will be losing any sleep over.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Post Reply