Subset
AnonymousSubset(dimension_name, hierarchy_name=None, expression=None, elements=None, alias='')
Bases: Subset
Abstraction of unregistered Subsets used in NativeViews (Check TM1py.ViewAxisSelection)
Source code in TM1py/Objects/Subset.py
from_dict(subset_as_dict)
classmethod
Alternative constructor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
subset_as_dict
|
Dict
|
dictionary, representation of Subset as specified in CSDL |
required |
Returns:
| Type | Description |
|---|---|
Subset
|
an instance of this class |
Source code in TM1py/Objects/Subset.py
from_json(subset_as_json)
classmethod
Alternative constructor
:Parameters:
subset_as_json : string, JSON
representation of Subset as specified in CSDL
:Returns:
Subset : an instance of this class
Source code in TM1py/Objects/Subset.py
Subset(subset_name, dimension_name, hierarchy_name=None, alias=None, expression=None, elements=None)
Bases: TM1Object
Abstraction of the TM1 Subset (dynamic and static)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
subset_name
|
str
|
String |
required |
dimension_name
|
str
|
String |
required |
hierarchy_name
|
str
|
String |
None
|
alias
|
str
|
String, alias that is active in this subset. |
None
|
expression
|
str
|
String |
None
|
elements
|
Iterable[str]
|
List, element names |
None
|
Source code in TM1py/Objects/Subset.py
alias
property
writable
body
property
same logic here as in TM1 : when subset has expression its dynamic, otherwise static
body_as_dict
property
same logic here as in TM1 : when subset has expression its dynamic, otherwise static
dimension_name
property
writable
elements
property
writable
expression
property
writable
hierarchy_name
property
writable
is_dynamic
property
is_static
property
name
property
writable
type
property
add_elements(elements)
add Elements to static subsets
:Parameters:
elements : list of element names
from_dict(subset_as_dict)
classmethod
Source code in TM1py/Objects/Subset.py
from_json(subset_as_json)
classmethod
Alternative constructor
:Parameters:
subset_as_json : string, JSON
representation of Subset as specified in CSDL
:Returns:
Subset : an instance of this class