Reputation: 157
I am using Pentaho Report Designer to generate reports from my olap cube using mdx. I want to generate bar chart reports from Pentaho Report Designer. I have 50000 records and writing a MDX query to display keywords along with their count. Problem is bar chart that is created is of 50000 records, but I want to pass two parameters that act as start and end value to display i.e user is prompted to enter starting and ending parameters (suppose he enters 1 and 10) so 10 records should be displayed.
Upvotes: 0
Views: 627
Reputation: 13315
I do not know the specifics of Pentaho MDX, but in general, I would use the following approach, assuming the 50000 records are in hierarchy [DimA].[Record]
:
WITH SET [Selected Records] AS
SubSet([DimA].[Record].[Record].Members,
ParamRef('start') - 1,
ParamRef('end') - ParamRef('start') + 1
)
SELECT { [Measures].[Count] }
ON COLUMNS,
[Selected Records]
ON ROWS
FROM [MyCube]
I am a bit guessing about the use of ParamRef
in Mondrian MDX here. The SubSet
function is described for Analysis Services here: http://msdn.microsoft.com/en-us/library/ms144767.aspx
Upvotes: 1