I know there are a few pagination features already available in Canvas, but I was trying to use MDX to build up the view and needed to know how many rows returned so that I can build a pagination on the Canvas page I am working on at the moment.
But so far I don’t have any idea how I can make it possible, anyone have any brilliant idea?
It will consume the result returned by an MDX query through the cubeExecuteMdx() function, and transform it into an object that should be easier to manage with an HTML table for example.
Hello,
if you use MDX to do pagination then there is one interesting function that could be utilized (I have used that in past): SUBSET(SET, START, COUNT)
The function works in TM1 (despite undocumented - EDIT: DOCUMENTED and SUPPORTED!) - but you should not supply START as negative number or being larger than SET size, otherwise I have experienced random server crashes.
MS docs: Subset (MDX) - SQL Server | Microsoft Learn