Dynamic subset and rule execution

Post Reply
Posts: 110
Joined: Sat Nov 06, 2010 10:10 am
OLAP Product: Cognos TM1
Version: 10.2.2
Excel Version: Excel 2013

Dynamic subset and rule execution

Post by vladino » Wed Jan 10, 2018 12:00 am

Hi guys,
I'm wondering how the rule is executed when dynamic subset is used within a cube view.

If my understanding is correct the rule is always executed only for cells within a view, not for the whole cube. So if I use a static subset then only members within the subset are evaluated/calculated - let's say only selected measures, products, org units etc.

But what if I use a dynamic subset? Does the rule behave the same way as for the static one?

I suppose it depends on the subset expression...

I'm interested in subsets that use FILTER function. What is happening in the cube if my dynamic subset uses FILTER function? Is the rule evaluated for the basis of the FILTER function or for the result of the FILTER function?

For example if I use an attribute for filtering the subset looks like this:
{FILTER( {TM1SUBSETALL( [Product] )}, [Product].[Category] = "Customer Lending")}

Is the rule evaluated for {TM1SUBSETALL( [Product] )} but the view shows only products with "Customer Lending" category? Or is the rule evaluated only for products with "Customer Lending" category?

And additionally - what happens when the dynamic subset is "connected" to another dimension within the cube? For example a relation between segment and product - I want to see only products for selected segment (segment dim is in the context and product dim is in rows). Is the rule evaluated for all products but only products for selected segment are shown within the view?

I assume this might have significant impact on performance because if I have hundreds/thousands of products within Product dimension but only few of them are flagged as "Customer Lending" (or use selected segment) then there must be a difference in the overall cube performance...

Appreciate any help!


Posts: 2523
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

Re: Dynamic subset and rule execution

Post by tomok » Wed Jan 10, 2018 11:43 am

TM1 is smart enough to know what needs to be calculated. You don't need to waste your time worrying about stuff like this.
Tom O'Kelley - Manager Finance Systems
American Tower

Trevor MacPherson
Posts: 13
Joined: Mon Jun 03, 2013 8:45 pm
OLAP Product: TM1
Version: 10.2
Excel Version: None

Re: Dynamic subset and rule execution

Post by Trevor MacPherson » Thu Jan 11, 2018 5:26 pm

I second Tomok's comment, and would just add that I edges are calculated first - rules apply to the cells, and aren't evaluated unless needed to satisfy a query for a cell, which isn't known until the edges are evaluated. If the edge's require cell evaluation to show (Top/Bottom X, value filter, etc...), then that will happen first based on the specific query required in the filter. That may be academic, but I've occasionally (if rarely) had utility with filters against lower dimensional cubes to define the subsets in a view of a more dimensional cube or one with more complex rules. This is not commonly necessary.

In your case:
{FILTER( {TM1SUBSETALL( [Product] )}, [Product].[Category] = "Customer Lending")}
needs to query cells in the }ElementAttributes_Product cube where the string Category = "Customer Lending".

That requires cells to be evaluated, but not cells in the target cube you are querying. Unless you did something horribly perverse, like use a rule in your attribute control cube to determine your "Customer Lending" attribute based on values in the larger cube you are querying.

Post Reply