Variable/Parameters in MDX
Posted: Thu Oct 24, 2019 5:59 am
Hi All:
I am creating a dynamic subset on my time dimension by MDX.
SubsetCreatebyMDX('MDXSet','{intersect(
Filter( TM1SubsetAll( [ContinuousTime] ), [ContinuousTime].[PreviousNumber] >= '|vEndNo|' ),
Filter( TM1SubsetAll( [ContinuousTime] ), [ContinuousTime].[PreviousNumber] <= '|vStartNo|' ) ) } ' ,0 )
I also have 2 variables vStartNo and vEndNo, which will get the relevant attributes from Time Dimension, those attributes are in number format.
vStartNo = ATTRN('Continuous Time', vTodayAU, 'StartNumber');
vEndNo= vStartNo - 21;
But when I pass the variable into the MDX the process says syntax error on or before:" vEndNo|' )Filter ( Invalid operator ".
I guess the problem is at where the variables been signed into MDX, ( >= '|vEndNo|' )
Could any expert provide hint.
Very much appreciated.
W
I am creating a dynamic subset on my time dimension by MDX.
SubsetCreatebyMDX('MDXSet','{intersect(
Filter( TM1SubsetAll( [ContinuousTime] ), [ContinuousTime].[PreviousNumber] >= '|vEndNo|' ),
Filter( TM1SubsetAll( [ContinuousTime] ), [ContinuousTime].[PreviousNumber] <= '|vStartNo|' ) ) } ' ,0 )
I also have 2 variables vStartNo and vEndNo, which will get the relevant attributes from Time Dimension, those attributes are in number format.
vStartNo = ATTRN('Continuous Time', vTodayAU, 'StartNumber');
vEndNo= vStartNo - 21;
But when I pass the variable into the MDX the process says syntax error on or before:" vEndNo|' )Filter ( Invalid operator ".
I guess the problem is at where the variables been signed into MDX, ( >= '|vEndNo|' )
Could any expert provide hint.
Very much appreciated.
W