Using Subsets in DBRW

Hi all,

Did you know that you can use subsets in Virtual Expressions?

Just need to use the following syntax: ##SUM([Dimension].[SubsetName]).

In the example below, the DBRW will be the sum of all departments in the subset Default:

With Slice’s Virtual Expression, you can use subsets with other functions such as AVG:

##AVG([Dimension].[SubsetName]) will give you the average of all elements in a subset

Cheers,

Vincent

3 Likes

Could you also use TM1SubsetToSet in that expression? Trying to avoid the old ambiguous subset references if possible.

Hi Ryan,

Yes, it’s better to use the TM1SubsetToSet function.

Inside a Virtual Expression, you need to use a MDX Expression, so yes TM1SubsetToSet works.

For example below I’m using ##SUM(TM1SubsetToSet ([Department].[Department], ‘Default’))

Cheers,

Vincent

2 Likes