Page 1 of 1

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

Posted: Sun Oct 09, 2016 11:54 pm
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!

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

Posted: Mon Oct 10, 2016 12:50 am
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

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

Posted: Mon Oct 10, 2016 10:21 am
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?

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

Posted: Mon Oct 10, 2016 11:21 am
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.

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

Posted: Mon Oct 10, 2016 4:35 pm
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.