numeric variable in mdx query
Posted: Thu Oct 15, 2015 2:02 pm
Hi all
This is hopefully a simple question, 'Can you use a tm1 defined numeric variable within an MDX query?'
I will show my example below;
nMin = CellGetN( cControlCube, 'HLC001', pAccount, 'HLE001' );
sCompanyMDX =
' { TOPCOUNT( { [HL Company] . [HLC001] . Children }, nMin, [ ' | cSourceCubeName | ' ] . ( [Period].[ ' | pPeriod | ' ], [Year].[ ' | pYear | ' ], [HL Account].[ ' | pAccount | ' ], [HL Measure] . [ ' | cAbs | ' ] ) ) };
The value in the cControlCube is 3
All the other variables are string in nature and if I replace nMin in the MDX query with the number 3 it all works perfectly.
I am hoping that it is just a syntax issue. I have also tried | nMin | and ' | nMin | ' neither of which worked
Thanks in advance for any help
This is hopefully a simple question, 'Can you use a tm1 defined numeric variable within an MDX query?'
I will show my example below;
nMin = CellGetN( cControlCube, 'HLC001', pAccount, 'HLE001' );
sCompanyMDX =
' { TOPCOUNT( { [HL Company] . [HLC001] . Children }, nMin, [ ' | cSourceCubeName | ' ] . ( [Period].[ ' | pPeriod | ' ], [Year].[ ' | pYear | ' ], [HL Account].[ ' | pAccount | ' ], [HL Measure] . [ ' | cAbs | ' ] ) ) };
The value in the cControlCube is 3
All the other variables are string in nature and if I replace nMin in the MDX query with the number 3 it all works perfectly.
I am hoping that it is just a syntax issue. I have also tried | nMin | and ' | nMin | ' neither of which worked
Thanks in advance for any help