Tm1-ui-table and MDX

Hi,

I’ve been seeing some strange behaviour with tm1-ui-table when using MDX.

I’ve got an mdx statement that creates a row set by doing stuff like:

{TM1SORT({TM1FILTERBYLEVEL({TM1SUBSETALL([dim1])},0)},ASC)}
*
{TM1SORT({TM1FILTERBYLEVEL({TM1SUBSETALL([dim2])},0)},ASC)}

…and so on.

Whilst the tm1-ui-table renders the table as expected, if I go beyond about 4 dims in my rows the ng-model i’ve attached to the tm1-ui-table tag gets broken, and just returns an empty array. The dev console chucks a "Cannot Read Property ‘Members’ of undefined’ error.

I’ve used this technique already with no problems, but it seems to object to about 4+ dimensions in the rows.

Has anyone else experienced this?

Jack

Hi Jack,

I have the same behavior but I think it is not due to the number of dimensions on rows but more on how big the view is.

with the following MDX Query:

{
		"id": "P&L3",
		"mdx": [
      "SELECT NON EMPTY {[General Ledger Measure].[Amount]} ON COLUMNS,",
      "NON EMPTY {TM1SORT({TM1FILTERBYLEVEL({TM1SUBSETALL([Version])},0)},ASC)} * {TM1SORT({TM1FILTERBYLEVEL({TM1SUBSETALL([Period])},0)},ASC)} * {[Account].AllMembers} * {[Department].AllMembers} ON ROWS",
      "FROM [General Ledger]",
      "WHERE ([Year].&[{{Year}}], [Region].&[{{Region}}],  [Currency].&[Local])" 
    ],
		"description":"",
		"mdxParams": [
			{ "name":"Year", "value":"2012" },
			{ "name":"Region", "value":"3" }
		]
	},

I get the same error as you:

In Architect I was able to open the view:

If I try with 4 dimensions but with a smaller number of elements:

{
		"id": "P&L2",
		"mdx": [
      "SELECT NON EMPTY {[General Ledger Measure].[Amount]} ON COLUMNS,",
      "NON EMPTY {[Version].[Actual], [Version].[Budget]} * {[Period].[Oct], [Period].[Oct YTD], [Period].[Year]} * {[Account].AllMembers} * {[Department].AllMembers} ON ROWS",
      "FROM [General Ledger]",
      "WHERE ([Year].&[{{Year}}], [Region].&[{{Region}}],  [Currency].&[Local])" 
    ],
		"description":"",
		"mdxParams": [
			{ "name":"Year", "value":"2012" },
			{ "name":"Region", "value":"3" }
		]
	},

It works:

I’ll raise a ticket to the support and let you know once we have a fix.

Cheers,

Vincent

Hey Vincent,

I think it’s to do with length of the actual MDX string, as opposed to the size of the view.

I’ve already created a bigger view than the one that’s failing for me, albeit via a smaller MDX expression.

Out of interest, did you test on the new build?

I only ask because there’s a new directive called tm1-ui-table-mdx, which I’m assuming is an iteration of tm1-ui-table.

Jack

Hi Jack,

Chrome has a limit on the size of strings it can handle, i.e. the json result, I believe yours is exceeding it. The result set contains the cell and dimension information. When stacking the dimensions like you have there will be a lots of element information returned.

I would suggest not stacking so many dimensions or use server side paging.

Looking at this again the error was caused by a bug unrelated to the stacking of dimensions. That has been fixed and will be in the next release.

Hey Tim,

My original query was around tm1-ui-table, whereas the responses appear to relate to tm1-ui-table-mdx?

Jack