For info, here is a script that works in my environment. I only use PAW editor (ver 2.0.41) no Architect anymore.
sDim = 'ActuarialSegment:CalculationSegment';
sMDX = '[' | sDim | ']';
sMDX = '{TM1SUBSETALL( ' | sMDX | ' )}';
sMDX = '{TM1FILTERBYLEVEL( ' | sMDX | ', 1)}';
If (SubsetExists(sDim, cSubset) = 0);
SubsetCreatebyMDX(cSubset, sMDX);
Else;
SubsetMDXSet(sDim, cSubset, sMDX);
Endif;
------------------------------
Trevor Mills
------------------------------
Original Message:
Sent: Sun June 09, 2019 09:34 AM
From: Anssi Lehtinen
Subject: Default set for hierarchy (PAW)
Thanks for the reply, Trevor
Unfortunately I'm unable to get that to work. I tried
SubsetCreatebyMDX('Customer:Customer By Country', vMDX);
and got Error: Prolog procedure line (6): Name ('Customer:Customer By Country') contains an invalid character (the invalid character being the colon, since if I remove that, I can create subsets, but obviously they do not become the default subset). Customer is my dimension and Customer By Country is the hierarchy I want the subset in.
Ran the code in the TI editor in PAW and will not fire up Architect until July when my vacation is over so will get back to this then.
Cheers, Anssi
------------------------------
Anssi Lehtinen
Original Message:
Sent: Thu June 06, 2019 08:19 AM
From: Trevor Mills
Subject: Default set for hierarchy (PAW)
Hi Anssi,
I create default subsets in hierarchies with a TI. E.g. SubsetCreatebyMDX('DimensionName:HierarchyName', sMDX);
regards
Trevor
------------------------------
Trevor Mills
Original Message:
Sent: Sun June 02, 2019 04:14 AM
From: Anssi Lehtinen
Subject: Default set for hierarchy (PAW)
Hi,
This might be a silly question, but I can't figure it out.
I have created hierarchies in my dimensions. However, I can't find a way to set default subsets for the hierarchies (setting one for the dimension/default hierarchy works fine). Naming a subset Default does nothing and the hierarchies can not be accessed in Architect so I can't go in and just check the box to make a set default. Any ideas?
The default set seems to default to "DESCENDANTS({[<dimension>].[<hierarchy>].DEFAULTMEMBER} , 1 , SELF_AND_BEFORE)", and I would in this case at the very least want to set the alias to use.
This is in cloud versions 2.0.6(TM1) and 42(PAW).
------------------------------
Anssi Lehtinen
------------------------------
#PlanningAnalyticswithWatson