SubsetMDXSet and SubsetCreatebyMDX error

Post Reply
gmunoz
Posts: 7
Joined: Mon Jul 29, 2024 6:58 am
OLAP Product: TM1
Version: 2.00.00
Excel Version: 2450

SubsetMDXSet and SubsetCreatebyMDX error

Post by gmunoz »

Hi Everyone.

I am modifying an already created an functioning process that modify subsets of 3 dimensions with inputs from the user and with that 3 subsets generates a MDX view that is used in the said process as a datasource. This is all made in prologue.

Yesterday i added a new dimension using the same code that is working in the other 3 dimension, this is a simplified version.

Code: Select all


PayElementMDXQuery = '[Int_Pay_Element].[Int_Pay_Element].[900]';

if (SubsetExists( 'Int_Pay_Element', '2D_Report_PayElement' ) = 1);
    
    SubsetMDXSet( 'Int_Pay_Element', '2D_Report_PayElement', PayElementMDXQuery );

else;

    SubsetCreatebyMDX( '2D_Report_PayElement', PayElementMDXQuery ,1  );   
When i use this MDX Expression in the subset editor works fine, as the dimension is very simple, so is the query. I have tried to to delete and create the subset manually changing names, trying to create the subset with a line of code in another process but i always get this simple error.
Process error log
Process "Write_2D_Report" aborted with errors
Error: Prolog procedure line (74): Could not create dynamic subset:
[Int_Pay_Element].[Int_Pay_Element].[900] expression:
<2>
or
Process error log
Process "Write_2D_Report" aborted with errors
Error: Prolog procedure line (79): Could not create dynamic subset:
expression:
[Int_Pay_Element].[Int_Pay_Element].[900]
depending if I create manually the susbet or if i delete it.

Thank you very much and feel free to ask for more context if it's needed.
Last edited by gmunoz on Tue Oct 08, 2024 11:01 am, edited 1 time in total.
MarenC
Regular Participant
Posts: 432
Joined: Sat Jun 08, 2019 9:55 am
OLAP Product: Planning Analytics
Version: Planning Analytics 2.0
Excel Version: Excel 2016

Re: SubsetMDXSet and SubsetCreatebyMDX error

Post by MarenC »

Hi,

try this:

Code: Select all

PayElementMDXQuery = '{[Int_Pay_Element].[Int_Pay_Element].[900]}';
Maren
gmunoz
Posts: 7
Joined: Mon Jul 29, 2024 6:58 am
OLAP Product: TM1
Version: 2.00.00
Excel Version: 2450

Re: SubsetMDXSet and SubsetCreatebyMDX error

Post by gmunoz »

MarenC wrote: Tue Oct 08, 2024 10:38 am Hi,

try this:

Code: Select all

PayElementMDXQuery = '{[Int_Pay_Element].[Int_Pay_Element].[900]}';
Maren
It works!!! Thank you very much.
User avatar
Steve Rowe
Site Admin
Posts: 2455
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: SubsetMDXSet and SubsetCreatebyMDX error

Post by Steve Rowe »

It's worth noting that the set editor in PA no longer requires / displays the opening set of curly brackets.
If you are using the MDX from the set editor to derive the MDX for the MDX set you are building you need to remember to add the curly brackets back as the TI functions require the opening curly brackets.

(Posted as an explanation as to why the OP maybe got to where they did)
Technical Director
www.infocat.co.uk
MarenC
Regular Participant
Posts: 432
Joined: Sat Jun 08, 2019 9:55 am
OLAP Product: Planning Analytics
Version: Planning Analytics 2.0
Excel Version: Excel 2016

Re: SubsetMDXSet and SubsetCreatebyMDX error

Post by MarenC »

It's worth noting that the set editor in PA no longer requires / displays the opening set of curly brackets.
I did wonder why gmunoz was saying the MDX expression was working in the set editor, so indeed useful to know.

Maren
Post Reply